Hi,
I'm having a problem with a simple test on Zend Test. My issue is specifically
with this test which keeps failing:
public function testAclForGuests()
{
$this->dispatch('/websites');
$this->assertRedirectTo('/login',
var_dump($this->response->getHeaders()));
}
When i run, i get the following var_dump:
array(1) {
[1]=>
array(3) {
["name"]=>
string(8) "Location"
["value"]=>
string(6) "/login"
["replace"]=>
bool(true)
}
}
As you can see, the redirect is happening to /login. After digging into
Zend_Test_PHPUnit_Constraint_Redirect i found that the problem is on line 212:
if (!$response->isRedirect()) {
return false;
}
Why would isRedirect() return false if, based on headers, it's clearly a
redirect?
Regards,
Fernando Morgenstern
[email protected]