public function NullSessionStorageTest::testSession

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/NullSessionHandlerTest.php, line 33

Class

NullSessionStorageTest
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'));
}