summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Estes <[email protected]>2013-08-16 22:08:19 -0700
committerMike Estes <[email protected]>2013-08-16 22:08:19 -0700
commita9b6e52ea8d301280a6320f510eb5af8f33ebd07 (patch)
tree72b53577f08a7eea03b2727c4c0a5de2f061220f /test
parent01112f5ac14b24aed8038cc0ae99801007ef26b8 (diff)
Add static method `get_config`
Diffstat (limited to 'test')
-rw-r--r--test/ConfigTest.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/test/ConfigTest.php b/test/ConfigTest.php
index 83194b4..43fe6fa 100644
--- a/test/ConfigTest.php
+++ b/test/ConfigTest.php
@@ -97,4 +97,27 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
$this->tearDownIdColumnOverrides();
}
-} \ No newline at end of file
+ public function testGetConfig() {
+ $this->assertTrue(ORM::get_config('logging'));
+ ORM::configure('logging', false);
+ $this->assertFalse(ORM::get_config('logging'));
+ }
+
+ public function testGetConfigArray() {
+ $expected = array(
+ 'connection_string' => 'sqlite::memory:',
+ 'id_column' => 'primary_key',
+ 'id_column_overrides' => array(),
+ 'error_mode' => PDO::ERRMODE_EXCEPTION,
+ 'username' => null,
+ 'password' => null,
+ 'driver_options' => null,
+ 'identifier_quote_character' => '`',
+ 'logging' => true,
+ 'caching' => false,
+ 'return_result_sets' => false,
+ );
+ $this->assertEquals($expected, ORM::get_config());
+ }
+
+}