@@ -39,6 +39,8 @@ public function testIndexActionRedirectsIfNotAuthenticated()
3939
4040 $ this ->dispatch ('/module ' );
4141
42+ $ this ->assertMatchedRouteName ('zf-module ' );
43+
4244 $ this ->assertControllerName (Controller \ModuleController::class);
4345 $ this ->assertActionName ('index ' );
4446 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
@@ -79,6 +81,8 @@ public function testIndexActionFetches100MostRecentlyUpdatedUserRepositories()
7981
8082 $ this ->dispatch ('/module ' );
8183
84+ $ this ->assertMatchedRouteName ('zf-module ' );
85+
8286 $ this ->assertControllerName (Controller \ModuleController::class);
8387 $ this ->assertActionName ('index ' );
8488 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
@@ -151,6 +155,8 @@ public function testIndexActionRendersUnregisteredModulesOnly()
151155
152156 $ this ->dispatch ('/module ' );
153157
158+ $ this ->assertMatchedRouteName ('zf-module ' );
159+
154160 $ this ->assertControllerName (Controller \ModuleController::class);
155161 $ this ->assertActionName ('index ' );
156162 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
@@ -181,6 +187,8 @@ public function testListActionRedirectsIfNotAuthenticated()
181187
182188 $ this ->dispatch ($ url );
183189
190+ $ this ->assertMatchedRouteName ('zf-module/list ' );
191+
184192 $ this ->assertControllerName (Controller \ModuleController::class);
185193 $ this ->assertActionName ('list ' );
186194 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
@@ -223,6 +231,8 @@ public function testListActionFetches100MostRecentlyUpdatedRepositoriesWhenNoOwn
223231
224232 $ this ->dispatch ('/module/list ' );
225233
234+ $ this ->assertMatchedRouteName ('zf-module/list ' );
235+
226236 $ this ->assertControllerName (Controller \ModuleController::class);
227237 $ this ->assertActionName ('list ' );
228238 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
@@ -331,6 +341,8 @@ public function testListActionFetches100MostRecentlyUpdatedRepositoriesWithOwner
331341
332342 $ this ->dispatch ($ url );
333343
344+ $ this ->assertMatchedRouteName ('zf-module/list ' );
345+
334346 $ this ->assertControllerName (Controller \ModuleController::class);
335347 $ this ->assertActionName ('list ' );
336348 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
@@ -410,11 +422,12 @@ public function testListActionRendersUnregisteredModulesOnly()
410422
411423 $ this ->dispatch ($ url );
412424
425+ $ this ->assertMatchedRouteName ('zf-module/list ' );
426+
413427 $ this ->assertControllerName (Controller \ModuleController::class);
414428 $ this ->assertActionName ('list ' );
415429 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
416430
417- /* @var Mvc\Application $application */
418431 $ viewModel = $ this ->getApplication ()->getMvcEvent ()->getViewModel ();
419432
420433 $ this ->assertTrue ($ viewModel ->terminate ());
@@ -433,6 +446,8 @@ public function testAddActionRedirectsIfNotAuthenticated()
433446
434447 $ this ->dispatch ('/module/add ' );
435448
449+ $ this ->assertMatchedRouteName ('zf-module/add ' );
450+
436451 $ this ->assertControllerName (Controller \ModuleController::class);
437452 $ this ->assertActionName ('add ' );
438453 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
@@ -454,6 +469,8 @@ public function testAddActionThrowsUnexpectedValueExceptionIfNotPostedTo($method
454469 $ method
455470 );
456471
472+ $ this ->assertMatchedRouteName ('zf-module/add ' );
473+
457474 $ this ->assertControllerName (Controller \ModuleController::class);
458475 $ this ->assertActionName ('add ' );
459476 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -525,6 +542,8 @@ public function testAddActionThrowsRuntimeExceptionIfUnableToFetchRepositoryMeta
525542 ]
526543 );
527544
545+ $ this ->assertMatchedRouteName ('zf-module/add ' );
546+
528547 $ this ->assertControllerName (Controller \ModuleController::class);
529548 $ this ->assertActionName ('add ' );
530549 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -586,6 +605,8 @@ public function testAddActionThrowsUnexpectedValueExceptionWhenRepositoryHasInsu
586605 ]
587606 );
588607
608+ $ this ->assertMatchedRouteName ('zf-module/add ' );
609+
589610 $ this ->assertControllerName (Controller \ModuleController::class);
590611 $ this ->assertActionName ('add ' );
591612 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -675,6 +696,8 @@ public function testAddActionThrowsUnexpectedValueExceptionWhenRepositoryIsNotAM
675696 ]
676697 );
677698
699+ $ this ->assertMatchedRouteName ('zf-module/add ' );
700+
678701 $ this ->assertControllerName (Controller \ModuleController::class);
679702 $ this ->assertActionName ('add ' );
680703 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -759,6 +782,8 @@ public function testAddActionRegistersRepositoryIfPermissionsAreSufficientAndItI
759782 ]
760783 );
761784
785+ $ this ->assertMatchedRouteName ('zf-module/add ' );
786+
762787 $ this ->assertControllerName (Controller \ModuleController::class);
763788 $ this ->assertActionName ('add ' );
764789 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
@@ -772,6 +797,8 @@ public function testRemoveActionRedirectsIfNotAuthenticated()
772797
773798 $ this ->dispatch ('/module/remove ' );
774799
800+ $ this ->assertMatchedRouteName ('zf-module/remove ' );
801+
775802 $ this ->assertControllerName (Controller \ModuleController::class);
776803 $ this ->assertActionName ('remove ' );
777804 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
@@ -793,6 +820,8 @@ public function testRemoveActionThrowsUnexpectedValueExceptionIfNotPostedTo($met
793820 $ method
794821 );
795822
823+ $ this ->assertMatchedRouteName ('zf-module/remove ' );
824+
796825 $ this ->assertControllerName (Controller \ModuleController::class);
797826 $ this ->assertActionName ('remove ' );
798827 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -846,6 +875,8 @@ public function testRemoveActionThrowsRuntimeExceptionIfUnableToFetchRepositoryM
846875 ]
847876 );
848877
878+ $ this ->assertMatchedRouteName ('zf-module/remove ' );
879+
849880 $ this ->assertControllerName (Controller \ModuleController::class);
850881 $ this ->assertActionName ('remove ' );
851882 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -907,6 +938,8 @@ public function testRemoveActionThrowsUnexpectedValueExceptionWhenRepositoryHasI
907938 ]
908939 );
909940
941+ $ this ->assertMatchedRouteName ('zf-module/remove ' );
942+
910943 $ this ->assertControllerName (Controller \ModuleController::class);
911944 $ this ->assertActionName ('remove ' );
912945 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -982,6 +1015,8 @@ public function testRemoveActionThrowsUnexpectedValueExceptionWhenRepositoryNotP
9821015 ]
9831016 );
9841017
1018+ $ this ->assertMatchedRouteName ('zf-module/remove ' );
1019+
9851020 $ this ->assertControllerName (Controller \ModuleController::class);
9861021 $ this ->assertActionName ('remove ' );
9871022 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
@@ -1067,6 +1102,8 @@ public function testRemoveActionDeletesModuleIfPermissionsAreSufficientAndItHasB
10671102 ]
10681103 );
10691104
1105+ $ this ->assertMatchedRouteName ('zf-module/remove ' );
1106+
10701107 $ this ->assertControllerName (Controller \ModuleController::class);
10711108 $ this ->assertActionName ('remove ' );
10721109 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
@@ -1107,6 +1144,8 @@ public function testViewActionSetsHttp404ResponseCodeIfModuleNotFound()
11071144
11081145 $ this ->dispatch ($ url );
11091146
1147+ $ this ->assertMatchedRouteName ('view-module ' );
1148+
11101149 $ this ->assertControllerName (Controller \ModuleController::class);
11111150 $ this ->assertActionName ('not-found ' );
11121151 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_404 );
@@ -1164,6 +1203,8 @@ public function testViewActionSetsHttp404ResponseCodeIfRepositoryMetaDataNotFoun
11641203
11651204 $ this ->dispatch ($ url );
11661205
1206+ $ this ->assertMatchedRouteName ('view-module ' );
1207+
11671208 $ this ->assertControllerName (Controller \ModuleController::class);
11681209 $ this ->assertActionName ('not-found ' );
11691210 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_404 );
@@ -1221,6 +1262,8 @@ public function testViewActionCanBeAccessed()
12211262
12221263 $ this ->dispatch ($ url );
12231264
1265+ $ this ->assertMatchedRouteName ('view-module ' );
1266+
12241267 $ this ->assertControllerName (Controller \ModuleController::class);
12251268 $ this ->assertActionName ('view ' );
12261269 }
0 commit comments