Zf2アルバムモジュールでphpunitを試しています。ルーティングに関するエラーが発生しました。
以下はデバッグ情報です。「「アルバム」という名前のルートが見つかりません」と表示されますが、アルバムモジュールフォルダのmodule.config.phpを確認すると、正しく設定されており、ブラウザでそのルートへのリダイレクトが正常に機能していることがわかります。
Album\Controller\AlbumControllerTest::testDeleteActionCanBeAccessed
Zend\Mvc\Router\Exception\RuntimeException: Route with name "album" not found
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\Mvc\Router\SimpleRouteStack.php:292
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\Plugin\Url.php:88
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\Plugin\Redirect.php:54
D:\www\zend2\module\Album\src\Album\Controller\AlbumController.php:80
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\AbstractActionController.php:87
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php:468
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\EventManager\EventManager.php:208
D:\www\zend2\vendor\zendframework\zendframework\library\Zend\Mvc\Controller\AbstractController.php:108
D:\www\zend2\tests\module\Album\src\Album\Controller\AlbumControllerTest.php:35
C:\wamp\bin\php\php5.4.3\phpunit:46
AlbumController.phpの80行目の問題は
return $this->redirect()->toRoute('album');
しかし、なぜそれが機能していないのかわかりません。誰かがそのような問題に遭遇し、克服しましたか?