public function logoutAction()
 {
     $this->application->getView()->clearCache();
     Session::destroy();
     setcookie(session_name(), '', time() - 42000, '/');
     $response = new Response();
     $response->setCacheControl('nocache');
     $response->redirect('/');
 }
Exemple #2
0
 /**
  * @covers \Core\Response\Response::redirect
  * @runInSeparateProcess
  */
 public function testRedirectWithValues()
 {
     $response = new Response();
     $response->redirect("/some/location", 301);
     $headersList = xdebug_get_headers();
     $statusCode = http_response_code();
     $this->assertSame(301, $statusCode);
     $this->assertContains('Location: /some/location', $headersList);
 }