[HttpFoundation] Add a test case to confirm a bug in session migration

This commit is contained in:
Jakub Zalas 2015-07-08 18:59:03 +01:00
parent 6f8a37cbae
commit eda5cb1c27
1 changed files with 11 additions and 0 deletions

View File

@ -119,6 +119,17 @@ class NativeSessionStorageTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(11, $storage->getBag('attributes')->get('legs'));
}
public function testSessionGlobalIsUpToDateAfterIdRegeneration()
{
$storage = $this->getStorage();
$storage->start();
$storage->getBag('attributes')->set('lucky', 7);
$storage->regenerate();
$storage->getBag('attributes')->set('lucky', 42);
$this->assertEquals(42, $_SESSION['_sf2_attributes']['lucky']);
}
public function testDefaultSessionCacheLimiter()
{
$this->iniSet('session.cache_limiter', 'nocache');