You are here

public function NativeSessionStorageTest::testGetId 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::testGetId()

File

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

Class

NativeSessionStorageTest
Test class for NativeSessionStorage.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage

Code

public function testGetId() {
  $storage = $this
    ->getStorage();
  $this
    ->assertSame('', $storage
    ->getId(), 'Empty ID before starting session');
  $storage
    ->start();
  $id = $storage
    ->getId();
  $this
    ->assertInternalType('string', $id);
  $this
    ->assertNotSame('', $id);
  $storage
    ->save();
  $this
    ->assertSame($id, $storage
    ->getId(), 'ID stays after saving session');
}