[HttpFoundation] Add a test case to confirm a bug in session migration
This commit is contained in:
parent
6f8a37cbae
commit
eda5cb1c27
|
@ -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');
|
||||
|
|
Reference in New Issue