mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user