PHP 클래스 phpbb_session_testable_factory

The session class has rather complex dependencies, so in order to make its tests more * understandable and to make its dependencies more visible this factory class sets up all the necessary global state & variable contents.
파일 보기 프로젝트 열기: phpbb/phpbb 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cache
$cache_data
$config
$config_data
$container
$cookies
$request

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

Initialises the factory with a set of default config and cache values.
public __construct ( )

check() 공개 메소드

Check if the cache used for the generated session contains correct data.
public check ( PHPUnit_Framework_Assert $test )
$test PHPUnit_Framework_Assert The test case to call assert methods on

get_cache_data() 공개 메소드

Retrieve the entire cache data to be passed to the session.
public get_cache_data ( ) : array
리턴 array Cache contents

get_config_data() 공개 메소드

Retrieve the entire config data to be passed to the session.
public get_config_data ( ) : array
리턴 array Configuration

get_server_data() 공개 메소드

Retrieve all server variables to be passed to the session.
public get_server_data ( ) : array
리턴 array Server variables

get_session() 공개 메소드

Retrieve the configured session class instance
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
리턴 phpbb_mock_session_testable A session instance

merge_cache_data() 공개 메소드

New values overwrite old ones.
public merge_cache_data ( array $cache_data )
$cache_data array The additional cache data

merge_config_data() 공개 메소드

New values overwrite new ones.
public merge_config_data ( array $config_data )
$config_data array The config data to merge with previous data

merge_server_data() 공개 메소드

New values overwrite old ones.
public merge_server_data ( array $server_data )
$server_data array The additional server variables

merge_test_data() 공개 메소드

New values overwrite old ones.
public merge_test_data ( $session_id, $user_id, $user_agent, $ip, integer $time )
$session_id
$user_id
$user_agent
$ip
$time integer

set_cookies() 공개 메소드

Set the cookies which should be present in the request data.
public set_cookies ( array $cookies )
$cookies array The cookie data, structured like $_COOKIE contents.

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

protected $cache

$cache_data 보호되어 있는 프로퍼티

protected $cache_data

$config 보호되어 있는 프로퍼티

protected $config

$config_data 보호되어 있는 프로퍼티

protected $config_data

$container 보호되어 있는 프로퍼티

protected $container

$cookies 보호되어 있는 프로퍼티

protected $cookies

$request 보호되어 있는 프로퍼티

protected $request