I want to create a simple access unit test like it is shown in the tutorial.
My project uses ZFCUser
for authentication.
As a result my (obviously not authenticated) tester get a HTTP response
of 302 and not the expected 200.
Any ideas what I can do about it? Thanks!
The code from the tutorial looks like this:
public function testAddActionCanBeAccessed()
{
$this->routeMatch->setParam('action', 'add');
$result = $this->controller->dispatch($this->request);
$response = $this->controller->getResponse();
$this->assertEquals(200, $response->getStatusCode());
}