Store PHP sessions in the database

This commit is contained in:
Frédéric Guillot
2017-12-06 16:19:11 -08:00
committed by Frédéric Guillot
parent 421531bd4f
commit ccd177ada6
58 changed files with 405 additions and 382 deletions

View File

@@ -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'));