/**
  * Ensures that the postDispatch() method of the controller is even called
  * if the response object contains a redirect.
  *
  * This behavior was introduced with ZF-7496 {@link http://framework.zend.com/issues/browse/ZF-7496}.
  */
 public function testPostDispatchIsCalledEvenOnRedirect()
 {
     $this->response->setRedirect('http://example.com');
     $this->dispatch('foo');
     $message = 'Post dispatch hook should have been called.';
     $this->assertTrue($this->controller->wasCalled('postDispatch'), $message);
 }
 /**
  * Ensures that redirectsTo() fails if the response redirects to an
  * unexpected url.
  */
 public function testRedirectsToFailsIfResponseRedirectsToUnexpectedUrl()
 {
     $this->assertFailure();
     $this->response->setRedirect('/test/url');
     $this->assertions->redirectsTo('/another/url');
 }