FileTest
extends SessionHandlerTestCase
in package
File Session Handler Test Class
Tags
Table of Contents
- $path : string
- Path to session files
- $services : PluginManager
- Mock database services.
- $tables : PluginManager
- Mock database tables.
- setUp() : void
- Generic setup method
- tearDown() : void
- Generic teardown method
- testDisabledWrites() : void
- Test disabling writes.
- testGarbageCollector() : void
- Test the session garbage collector.
- testWriteReadAndDestroy() : void
- Test the standard default session life cycle.
- 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
$path
Path to session files
protected
string
$path
$services
Mock database services.
protected
PluginManager
$services
= false
$tables
Mock database tables.
protected
PluginManager
$tables
= false
Methods
setUp()
Generic setup method
public
setUp() : void
Return values
void —tearDown()
Generic teardown method
public
tearDown() : void
Return values
void —testDisabledWrites()
Test disabling writes.
public
testDisabledWrites() : void
Return values
void —testGarbageCollector()
Test the session garbage collector.
public
testGarbageCollector() : void
Return values
void —testWriteReadAndDestroy()
Test the standard default session life cycle.
public
testWriteReadAndDestroy() : void
Return values
void —getHandler()
Get the session handler to test.
protected
getHandler([Config $config = null ]) : Database
Parameters
- $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.