diff options
author | Nils Adermann <naderman@naderman.de> | 2011-01-04 17:14:36 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2011-01-20 22:47:48 +0100 |
commit | 74f537e89d899831c606b9abe218383a4e71408e (patch) | |
tree | f813e889fe6c584fb0a73b3bc642cdd1c243a5b7 /tests/test_framework | |
parent | ba5c7d8e63d97650989c2866c20c11f16f4c1128 (diff) | |
download | forums-74f537e89d899831c606b9abe218383a4e71408e.tar forums-74f537e89d899831c606b9abe218383a4e71408e.tar.gz forums-74f537e89d899831c606b9abe218383a4e71408e.tar.bz2 forums-74f537e89d899831c606b9abe218383a4e71408e.tar.xz forums-74f537e89d899831c606b9abe218383a4e71408e.zip |
[task/session-tests] Added tests for the session class.
Two first simple tests to check functionality of session_begin and
session_create.
Added a mock class for the cache as well as a subclass of session
which has its cookie handling function mocked out to avoid header
sending problems.
PHPBB3-9732
Diffstat (limited to 'tests/test_framework')
-rw-r--r-- | tests/test_framework/phpbb_database_test_case.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_database_test_case.php b/tests/test_framework/phpbb_database_test_case.php index 9752ec2fe6..9f1703b477 100644 --- a/tests/test_framework/phpbb_database_test_case.php +++ b/tests/test_framework/phpbb_database_test_case.php @@ -384,6 +384,17 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test return $db; } + public function assertResultEquals($sql, $expected, $message = '') + { + $db = $this->new_dbal(); + + $result = $db->sql_query($sql); + $rows = $db->sql_fetchrowset($result); + $db->sql_freeresult($result); + + $this->assertEquals($expected, $rows, $message); + } + public function setExpectedTriggerError($errno, $message = '') { $this->get_test_case_helpers()->setExpectedTriggerError($errno, $message); |