You are here

public function RequestTest::testGetSession in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testGetSession()

File

vendor/symfony/http-foundation/Tests/RequestTest.php, line 1377

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testGetSession() {
  $request = new Request();
  $request
    ->setSession(new Session(new MockArraySessionStorage()));
  $this
    ->assertTrue($request
    ->hasSession());
  $session = $request
    ->getSession();
  $this
    ->assertObjectHasAttribute('storage', $session);
  $this
    ->assertObjectHasAttribute('flashName', $session);
  $this
    ->assertObjectHasAttribute('attributeName', $session);
}