If the user has to be authenticated to hit the index
method, you need to authenticate each test.
The all
isn't getting called because the user is being redirected.
Create an authentication
method that you can call each time you need to authenticate the request.
To see why the test failing, dump out the response before you do the assert.
Edit
The problem is you've mocked Dumminvoicing\Storage\Project\ProjectRepositoryInterface
but it should be Dumminvoicing\Storage\Project\ProjectRepository
.
If you correct the namespace and add $this->mock->shouldReceive('all')->once();
to the testAllowedWhenLogged()
method your tests will pass correctly.