Example #1
0
 public function testNoDuplicateLocationHeader()
 {
     $this->_response->setRedirect('http://www.example.com/foo/bar');
     $this->_response->setRedirect('http://www.example.com/bar/baz');
     $headers = $this->_response->getHeaders();
     $location = 0;
     foreach ($headers as $header) {
         if ('Location' == $header['name']) {
             ++$location;
         }
     }
     $this->assertEquals(1, $location);
 }
Example #2
0
 public function testIsRedirectWhenRedirectSet()
 {
     $this->_response->setRedirect('http://framework.zend.com/');
     $this->assertTrue($this->_response->isRedirect());
 }