You are here

public function NullSessionHandlerTest::testSession in Zircon Profile 8.0

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

File

vendor/symfony/http-foundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php, line 34

Class

NullSessionHandlerTest
Test class for NullSessionHandler.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler

Code

public function testSession() {
  session_id('nullsessionstorage');
  $storage = $this
    ->getStorage();
  $session = new Session($storage);
  $this
    ->assertNull($session
    ->get('something'));
  $session
    ->set('something', 'unique');
  $this
    ->assertEquals('unique', $session
    ->get('something'));
}