diff options
author | Andy Chase <asperous2@gmail.com> | 2013-07-22 17:39:45 -0700 |
---|---|---|
committer | Andy Chase <asperous2@gmail.com> | 2013-07-22 17:39:45 -0700 |
commit | 2fe2724e684304e1c8323c047d1dde6cd732afcd (patch) | |
tree | cf52d225f5996ea9706aa5bad2d547098e94a648 /tests/session/garbage_collection_test.php | |
parent | 0c54fb034b71cfc2bff338430acb1e2b43083dd5 (diff) | |
download | forums-2fe2724e684304e1c8323c047d1dde6cd732afcd.tar forums-2fe2724e684304e1c8323c047d1dde6cd732afcd.tar.gz forums-2fe2724e684304e1c8323c047d1dde6cd732afcd.tar.bz2 forums-2fe2724e684304e1c8323c047d1dde6cd732afcd.tar.xz forums-2fe2724e684304e1c8323c047d1dde6cd732afcd.zip |
[ticket/11620] Whitespace and combine function into test_case
PHPBB3-11620
Diffstat (limited to 'tests/session/garbage_collection_test.php')
-rw-r--r-- | tests/session/garbage_collection_test.php | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php index b1be958d62..e7d01785dd 100644 --- a/tests/session/garbage_collection_test.php +++ b/tests/session/garbage_collection_test.php @@ -24,29 +24,19 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case $this->session = $this->session_factory->get_session($this->db); } - protected function assert_sessions_equal($expected, $msg) - { - $sql = 'SELECT session_id, session_user_id - FROM phpbb_sessions - ORDER BY session_user_id'; - - $this->assertSqlResultEquals($expected, $sql, $msg); - } - public function test_cleanup_all() { - $this->assert_sessions_equal( + $this->check_sessions_equals( array( - array - ( + array( 'session_id' => 'anon_session00000000000000000000', 'session_user_id' => 1, ), - array - ( + array( 'session_id' => 'bar_session000000000000000000000', 'session_user_id' => 4, - )), + ), + ), 'Before test, should have some sessions.' ); // Set session length so it clears all @@ -55,7 +45,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case // There is an error unless the captcha plugin is set $config['captcha_plugin'] = 'phpbb_captcha_nogd'; $this->session->session_gc(); - $this->assert_sessions_equal( + $this->check_sessions_equals( array(), 'After setting session time to 0, should remove all.' ); |