Example #1
0
 public function testBackRedirectShouldHasRootLocationIfRefererFromAnotherDomain()
 {
     $_SERVER['HTTP_REFERER'] = 'http://example.com/foo';
     unset($_SERVER['HTTP_HOST']);
     $this->redirect->back();
     self::assertEquals('/', $this->getResponse()->getHeader('Location'));
     self::assertEquals(302, $this->getResponse()->getStatus());
 }