Zf2 앨범 모듈에서 phpunit을 시험하고 있습니다. 라우팅에 대해 언급 한 오류가 발생했습니다.ZF2 단위 테스트 앨범 모듈이 라우팅 문제를 반환합니다.
다음은 디버그 정보입니다. 그것은 'Route with name'앨범을 찾지 못했지만, 앨범 모듈 폴더에서 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');
그러나이 작동하지 않는 이유는 확실하지 않은 것을 이해합니다. 어떤 사람이 그러한 문제를 만나고 극복 했습니까?
예 발생했습니다. 아직 이것을 극복하지 못했습니다 .. –