MockArraySessionStorage::regenerate()

bool regenerate(bool $destroy = false, int $lifetime = null) Regenerates id that represents this storage. This method must invoke sessionregenerateid($destroy) unless this interface is used for a storage object designed for unit or functional testing where a real PHP session would interfere with testing. Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage. Care: When regenerating the session ID no locking is inv

MockArraySessionStorage::isStarted()

bool isStarted() Checks if the session is started. Return Value bool True if started, false otherwise

MockArraySessionStorage::getName()

mixed getName() Returns the session name. Return Value mixed The session name

MockArraySessionStorage::getMetadataBag()

MetadataBag getMetadataBag() Gets the MetadataBag. Return Value MetadataBag

MockArraySessionStorage::getId()

string getId() Returns the session ID. Return Value string The session ID or empty

MockArraySessionStorage::getBag()

SessionBagInterface getBag(string $name) Gets a SessionBagInterface by name. Parameters string $name Return Value SessionBagInterface Exceptions InvalidArgumentException If the bag does not exist

MockArraySessionStorage::clear()

clear() Clear all session data in memory.

MockArraySessionStorage

class MockArraySessionStorage implements SessionStorageInterface MockArraySessionStorage mocks the session for unit tests. No PHP session is actually started since a session can be initialized and shutdown only once per PHP execution cycle. When doing functional testing, you should use MockFileSessionStorage instead. Methods __construct(string $name = 'MOCKSESSID', MetadataBag $metaBag = null) Constructor. setSessionData(array $array) Sets the session data. bool start() Starts

MissingResourceException

class MissingResourceException extends RuntimeException Thrown when an invalid entry of a resource bundle was requested.

MissingOptionsException

class MissingOptionsException extends ValidatorException Methods __construct($message, array $options) getOptions() Details __construct($message, array $options) Parameters $message array $options getOptions()