You are here

public function TestSessionListenerTest::testDoesNotDeleteCookieIfUsingSessionLifetime in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\TestSessionListenerTest::testDoesNotDeleteCookieIfUsingSessionLifetime()

File

vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php, line 60

Class

TestSessionListenerTest
SessionListenerTest.

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

public function testDoesNotDeleteCookieIfUsingSessionLifetime() {
  $this
    ->sessionHasBeenStarted();
  $params = session_get_cookie_params();
  session_set_cookie_params(0, $params['path'], $params['domain'], $params['secure'], $params['httponly']);
  $response = $this
    ->filterResponse(new Request(), HttpKernelInterface::MASTER_REQUEST);
  $cookies = $response->headers
    ->getCookies();
  $this
    ->assertEquals(0, reset($cookies)
    ->getExpiresTime());
}