mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
Trying to get tests to pass
- Cast type array to array - Try explicitly disconnecting db after test
This commit is contained in:
parent
91b5782e5f
commit
cf1f99a828
@ -72,7 +72,7 @@ class PreferencesCommandTest extends CommandBase
|
|||||||
$this->assertArrayHasKey($this->preference_name, $post[static::APP]);
|
$this->assertArrayHasKey($this->preference_name, $post[static::APP]);
|
||||||
$this->assertEquals($set[$this->preference_name], $post[static::APP][$this->preference_name]);
|
$this->assertEquals($set[$this->preference_name], $post[static::APP][$this->preference_name]);
|
||||||
// At type level
|
// 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->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");
|
$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]);
|
$this->assertEquals($set[$this->preference_name], $post[static::APP][$this->preference_name]);
|
||||||
|
|
||||||
// At type level
|
// 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->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");
|
$this->assertGreaterThan($log_count, $this->get_log_count(), "Command ($command) did not log");
|
||||||
@ -168,7 +168,7 @@ class PreferencesCommandTest extends CommandBase
|
|||||||
);
|
);
|
||||||
|
|
||||||
// At type level
|
// 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->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");
|
$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);
|
$post = $post_pref->read_repository(false);
|
||||||
|
|
||||||
// At type level - should always be what we set
|
// 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]);
|
$this->assertEquals($set[$this->preference_name], $post_pref->$type[static::APP][$this->preference_name]);
|
||||||
|
|
||||||
// At user level - depends on type priority
|
// At user level - depends on type priority
|
||||||
|
@ -95,6 +95,10 @@ abstract class LoggedInTest extends TestCase
|
|||||||
{
|
{
|
||||||
$GLOBALS['egw']->applications = null;
|
$GLOBALS['egw']->applications = null;
|
||||||
}
|
}
|
||||||
|
if($GLOBALS['egw']->db)
|
||||||
|
{
|
||||||
|
$GLOBALS['egw']->db->disconnect();
|
||||||
|
}
|
||||||
unset($GLOBALS['egw']);
|
unset($GLOBALS['egw']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user