Store PHP sessions in the database
This commit is contained in:
committed by
Frédéric Guillot
parent
421531bd4f
commit
ccd177ada6
@@ -29,7 +29,7 @@ class PasswordResetValidatorTest extends Base
|
||||
|
||||
public function testValidateCreation()
|
||||
{
|
||||
$this->container['sessionStorage']->captcha = 'test';
|
||||
$_SESSION['captcha'] = 'test';
|
||||
|
||||
$passwordResetValidator = new PasswordResetValidator($this->container);
|
||||
list($valid,) = $passwordResetValidator->validateCreation(array('username' => 'foobar', 'captcha' => 'test'));
|
||||
@@ -38,7 +38,7 @@ class PasswordResetValidatorTest extends Base
|
||||
|
||||
public function testValidateCreationWithNoUsername()
|
||||
{
|
||||
$this->container['sessionStorage']->captcha = 'test';
|
||||
$_SESSION['captcha'] = 'test';
|
||||
|
||||
$passwordResetValidator = new PasswordResetValidator($this->container);
|
||||
list($valid,) = $passwordResetValidator->validateCreation(array('captcha' => 'test'));
|
||||
@@ -47,7 +47,7 @@ class PasswordResetValidatorTest extends Base
|
||||
|
||||
public function testValidateCreationWithWrongCaptcha()
|
||||
{
|
||||
$this->container['sessionStorage']->captcha = 'test123';
|
||||
$_SESSION['captcha'] = 'test123';
|
||||
|
||||
$passwordResetValidator = new PasswordResetValidator($this->container);
|
||||
list($valid,) = $passwordResetValidator->validateCreation(array('username' => 'foobar', 'captcha' => 'test'));
|
||||
|
||||
@@ -11,7 +11,7 @@ class UserValidatorTest extends Base
|
||||
{
|
||||
$userValidator = new UserValidator($this->container);
|
||||
|
||||
$this->container['sessionStorage']->user = array(
|
||||
$_SESSION['user'] = array(
|
||||
'id' => 1,
|
||||
'role' => Role::APP_ADMIN,
|
||||
'username' => 'admin',
|
||||
|
||||
Reference in New Issue
Block a user