Read only access to the session during testing.
array|null
__construct(?array $session)
array|null
$session Session data.
check(?string $name)
Returns true if given variable name is set in session.
string|null
$name optional Variable name to check for
bool
True if variable is there
read(?string $name)
Returns given session variable, or all of them, if no parameters given.
string|null
$name optional The name of the session variable (or a path as sent to Hash.extract)
mixed
The value of the session variable, null if session not available, session not started, or provided name not found in the session.
array|null
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.TestSuite.TestSession.html