diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ConfigTest.php | 25 |
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()); + } + +} |