You are here

public function NativeSessionStorageTest::testRegenerateDestroy in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\NativeSessionStorageTest::testRegenerateDestroy()

File

vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php, line 111

Class

NativeSessionStorageTest
Test class for NativeSessionStorage.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage

Code

public function testRegenerateDestroy() {
  $storage = $this
    ->getStorage();
  $storage
    ->start();
  $id = $storage
    ->getId();
  $storage
    ->getBag('attributes')
    ->set('legs', 11);
  $storage
    ->regenerate(true);
  $this
    ->assertNotEquals($id, $storage
    ->getId());
  $this
    ->assertEquals(11, $storage
    ->getBag('attributes')
    ->get('legs'));
}