Property | Type | Description | |
---|---|---|---|
$cache | |||
$cache_data | |||
$config | |||
$config_data | |||
$container | |||
$cookies | |||
$request |
Method | Description | |
---|---|---|
__construct ( ) | Initialises the factory with a set of default config and cache values. | |
check ( PHPUnit_Framework_Assert $test ) | Check if the cache used for the generated session contains correct data. | |
get_cache_data ( ) : array | Retrieve the entire cache data to be passed to the session. | |
get_config_data ( ) : array | Retrieve the entire config data to be passed to the session. | |
get_server_data ( ) : array | Retrieve all server variables to be passed to the session. | |
get_session ( phpbb\db\driver\driver_interface $dbal ) : phpbb_mock_session_testable | Retrieve the configured session class instance | |
merge_cache_data ( array $cache_data ) | Merge the cache contents with more data. | |
merge_config_data ( array $config_data ) | Merge config data with the current config data to be supplied to session. | |
merge_server_data ( array $server_data ) | Merge the current server info ($_SERVER) with more data. | |
merge_test_data ( $session_id, $user_id, $user_agent, $ip, integer $time ) | Set cookies, merge config and server data in one step. | |
set_cookies ( array $cookies ) | Set the cookies which should be present in the request data. |
public __construct ( ) |
public check ( PHPUnit_Framework_Assert $test ) | ||
$test | PHPUnit_Framework_Assert | The test case to call assert methods on |
public get_cache_data ( ) : array | ||
return | array | Cache contents |
public get_config_data ( ) : array | ||
return | array | Configuration |
public get_server_data ( ) : array | ||
return | array | Server variables |
public get_session ( phpbb\db\driver\driver_interface $dbal ) : phpbb_mock_session_testable | ||
$dbal | phpbb\db\driver\driver_interface | The database connection to use for session data |
return | phpbb_mock_session_testable | A session instance |
public merge_cache_data ( array $cache_data ) | ||
$cache_data | array | The additional cache data |
public merge_config_data ( array $config_data ) | ||
$config_data | array | The config data to merge with previous data |
public merge_server_data ( array $server_data ) | ||
$server_data | array | The additional server variables |
public merge_test_data ( $session_id, $user_id, $user_agent, $ip, integer $time ) | ||
$session_id | ||
$user_id | ||
$user_agent | ||
$ip | ||
$time | integer |
public set_cookies ( array $cookies ) | ||
$cookies | array | The cookie data, structured like $_COOKIE contents. |