RedisTest
extends SessionHandlerTestCase
in package
Redis Session Handler Test Class
Tags
Table of Contents
- $services : PluginManager
- Mock database services.
- $tables : PluginManager
- Mock database tables.
- testDestroyDefault() : void
- Test destroying a session with default (Redis version 3) support.
- testDestroyNewRedis() : void
- Test destroying a session with newer (Redis version 4+) support.
- testRead() : void
- Test reading a session from the database.
- testWrite() : void
- Test writing a session with default configs.
- getHandler() : Database
- Get the session handler to test.
- getServices() : PluginManager
- Get mock database service plugin manager
- getTables() : PluginManager
- Get mock database plugin manager
- injectMockDatabaseDependencies() : void
- Set up mock database services for a session handler.
- injectMockDatabaseTables() : void
- Set up mock databases for a session handler.
- setUpDestroyExpectations() : void
- Set up expectations for the standard abstract handler's destroy behavior.
Properties
$services
Mock database services.
protected
PluginManager
$services
= false
$tables
Mock database tables.
protected
PluginManager
$tables
= false
Methods
testDestroyDefault()
Test destroying a session with default (Redis version 3) support.
public
testDestroyDefault() : void
Return values
void —testDestroyNewRedis()
Test destroying a session with newer (Redis version 4+) support.
public
testDestroyNewRedis() : void
Return values
void —testRead()
Test reading a session from the database.
public
testRead() : void
Return values
void —testWrite()
Test writing a session with default configs.
public
testWrite() : void
Return values
void —getHandler()
Get the session handler to test.
protected
getHandler(Credis_Client $client[, Config $config = null ]) : Database
Parameters
- $client : Credis_Client
-
Client object
- $config : Config = null
-
Optional configuration
Return values
Database —getServices()
Get mock database service plugin manager
protected
getServices() : PluginManager
Return values
PluginManager —getTables()
Get mock database plugin manager
protected
getTables() : PluginManager
Return values
PluginManager —injectMockDatabaseDependencies()
Set up mock database services for a session handler.
protected
injectMockDatabaseDependencies(AbstractBase $handler) : void
Parameters
- $handler : AbstractBase
-
Session handler
Return values
void —injectMockDatabaseTables()
Set up mock databases for a session handler.
protected
injectMockDatabaseTables(AbstractBase $handler) : void
Parameters
- $handler : AbstractBase
-
Session handler
Return values
void —setUpDestroyExpectations()
Set up expectations for the standard abstract handler's destroy behavior.
protected
setUpDestroyExpectations(string $sessId) : void
Parameters
- $sessId : string
-
Session ID that we expect will be destroyed.