When doing unit testing using PhpUnit in ZF2, the following message shows up:
Failed asserting that 302 matches expected 200
I understand that it shown up because of the redirection command of ZF2:
return $this->redirect()->toUrl('/admin/album/add');
But when I access it in the browser, the site works find with the above code. But it fails in the unit testing.
What should I have to change?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…