summaryrefslogtreecommitdiff
path: root/test/ConfigTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'test/ConfigTest.php')
-rw-r--r--test/ConfigTest.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/test/ConfigTest.php b/test/ConfigTest.php
index 83194b4..7644181 100644
--- a/test/ConfigTest.php
+++ b/test/ConfigTest.php
@@ -97,4 +97,29 @@ 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'));
+ ORM::configure('logging', true);
+ }
+
+ 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,
+ 'logger' => null,
+ 'caching' => false,
+ 'return_result_sets' => false,
+ );
+ $this->assertEquals($expected, ORM::get_config());
+ }
+
+}