diff --git a/admin/tests/PreferencesCommandTest.php b/admin/tests/PreferencesCommandTest.php index 7765eb302f..8da7ed9b7e 100644 --- a/admin/tests/PreferencesCommandTest.php +++ b/admin/tests/PreferencesCommandTest.php @@ -72,7 +72,7 @@ class PreferencesCommandTest extends CommandBase $this->assertArrayHasKey($this->preference_name, $post[static::APP]); $this->assertEquals($set[$this->preference_name], $post[static::APP][$this->preference_name]); // At type level - $this->assertArrayHasKey($this->preference_name, $post_pref->$type[static::APP]); + $this->assertArrayHasKey($this->preference_name, (Array)$post_pref->$type[static::APP]); $this->assertEquals($set[$this->preference_name], $post_pref->$type[static::APP][$this->preference_name]); $this->assertGreaterThan($log_count, $this->get_log_count(), "Command ($command) did not log"); @@ -119,7 +119,7 @@ class PreferencesCommandTest extends CommandBase $this->assertEquals($set[$this->preference_name], $post[static::APP][$this->preference_name]); // At type level - $this->assertArrayHasKey($this->preference_name, $post_pref->$type[static::APP]); + $this->assertArrayHasKey($this->preference_name, (Array)$post_pref->$type[static::APP]); $this->assertEquals($set[$this->preference_name], $post_pref->$type[static::APP][$this->preference_name]); $this->assertGreaterThan($log_count, $this->get_log_count(), "Command ($command) did not log"); @@ -168,7 +168,7 @@ class PreferencesCommandTest extends CommandBase ); // At type level - $this->assertArrayHasKey($this->preference_name, $post_pref->$type[static::APP]); + $this->assertArrayHasKey($this->preference_name, (Array)$post_pref->$type[static::APP]); $this->assertEquals($set[$this->preference_name], $post_pref->$type[static::APP][$this->preference_name]); $this->assertGreaterThan($log_count, $this->get_log_count(), "Command ($command) did not log"); @@ -213,7 +213,7 @@ class PreferencesCommandTest extends CommandBase $post = $post_pref->read_repository(false); // At type level - should always be what we set - $this->assertArrayHasKey($this->preference_name, $post_pref->$type[static::APP]); + $this->assertArrayHasKey($this->preference_name, (Array)$post_pref->$type[static::APP]); $this->assertEquals($set[$this->preference_name], $post_pref->$type[static::APP][$this->preference_name]); // At user level - depends on type priority diff --git a/api/tests/LoggedInTest.php b/api/tests/LoggedInTest.php index da4e166760..d9b3793c73 100644 --- a/api/tests/LoggedInTest.php +++ b/api/tests/LoggedInTest.php @@ -95,6 +95,10 @@ abstract class LoggedInTest extends TestCase { $GLOBALS['egw']->applications = null; } + if($GLOBALS['egw']->db) + { + $GLOBALS['egw']->db->disconnect(); + } unset($GLOBALS['egw']); }