2222/**
2323 * @method Mvc\Application getApplication()
2424 */
25- class IndexControllerTest extends AbstractHttpControllerTestCase
25+ class ModuleControllerTest extends AbstractHttpControllerTestCase
2626{
2727 use AuthenticationTrait;
2828
@@ -39,7 +39,7 @@ public function testIndexActionRedirectsIfNotAuthenticated()
3939
4040 $ this ->dispatch ('/module ' );
4141
42- $ this ->assertControllerName (Controller \IndexController ::class);
42+ $ this ->assertControllerName (Controller \ModuleController ::class);
4343 $ this ->assertActionName ('index ' );
4444 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
4545
@@ -79,7 +79,7 @@ public function testIndexActionFetches100MostRecentlyUpdatedUserRepositories()
7979
8080 $ this ->dispatch ('/module ' );
8181
82- $ this ->assertControllerName (Controller \IndexController ::class);
82+ $ this ->assertControllerName (Controller \ModuleController ::class);
8383 $ this ->assertActionName ('index ' );
8484 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
8585 }
@@ -151,15 +151,15 @@ public function testIndexActionRendersUnregisteredModulesOnly()
151151
152152 $ this ->dispatch ('/module ' );
153153
154- $ this ->assertControllerName (Controller \IndexController ::class);
154+ $ this ->assertControllerName (Controller \ModuleController ::class);
155155 $ this ->assertActionName ('index ' );
156156 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
157157
158158 /* @var Mvc\Application $application */
159159 $ viewModel = $ this ->getApplication ()->getMvcEvent ()->getViewModel ();
160160
161161 $ this ->assertTrue ($ viewModel ->terminate ());
162- $ this ->assertSame ('zf-module/index /index ' , $ viewModel ->getTemplate ());
162+ $ this ->assertSame ('zf-module/module /index ' , $ viewModel ->getTemplate ());
163163
164164 $ viewVariable = $ viewModel ->getVariable ('repositories ' );
165165
@@ -181,7 +181,7 @@ public function testOrganizationActionRedirectsIfNotAuthenticated()
181181
182182 $ this ->dispatch ($ url );
183183
184- $ this ->assertControllerName (Controller \IndexController ::class);
184+ $ this ->assertControllerName (Controller \ModuleController ::class);
185185 $ this ->assertActionName ('organization ' );
186186 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
187187
@@ -223,7 +223,7 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
223223
224224 $ this ->dispatch ('/module/list ' );
225225
226- $ this ->assertControllerName (Controller \IndexController ::class);
226+ $ this ->assertControllerName (Controller \ModuleController ::class);
227227 $ this ->assertActionName ('organization ' );
228228 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
229229 }
@@ -331,7 +331,7 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
331331
332332 $ this ->dispatch ($ url );
333333
334- $ this ->assertControllerName (Controller \IndexController ::class);
334+ $ this ->assertControllerName (Controller \ModuleController ::class);
335335 $ this ->assertActionName ('organization ' );
336336 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
337337 }
@@ -410,15 +410,15 @@ public function testOrganizationActionRendersUnregisteredModulesOnly()
410410
411411 $ this ->dispatch ($ url );
412412
413- $ this ->assertControllerName (Controller \IndexController ::class);
413+ $ this ->assertControllerName (Controller \ModuleController ::class);
414414 $ this ->assertActionName ('organization ' );
415415 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
416416
417417 /* @var Mvc\Application $application */
418418 $ viewModel = $ this ->getApplication ()->getMvcEvent ()->getViewModel ();
419419
420420 $ this ->assertTrue ($ viewModel ->terminate ());
421- $ this ->assertSame ('zf-module/index /index.phtml ' , $ viewModel ->getTemplate ());
421+ $ this ->assertSame ('zf-module/module /index.phtml ' , $ viewModel ->getTemplate ());
422422
423423 $ viewVariable = $ viewModel ->getVariable ('repositories ' );
424424
@@ -433,7 +433,7 @@ public function testAddActionRedirectsIfNotAuthenticated()
433433
434434 $ this ->dispatch ('/module/add ' );
435435
436- $ this ->assertControllerName (Controller \IndexController ::class);
436+ $ this ->assertControllerName (Controller \ModuleController ::class);
437437 $ this ->assertActionName ('add ' );
438438 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
439439
@@ -454,7 +454,7 @@ public function testAddActionThrowsUnexpectedValueExceptionIfNotPostedTo($method
454454 $ method
455455 );
456456
457- $ this ->assertControllerName (Controller \IndexController ::class);
457+ $ this ->assertControllerName (Controller \ModuleController ::class);
458458 $ this ->assertActionName ('add ' );
459459 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
460460
@@ -525,7 +525,7 @@ public function testAddActionThrowsRuntimeExceptionIfUnableToFetchRepositoryMeta
525525 ]
526526 );
527527
528- $ this ->assertControllerName (Controller \IndexController ::class);
528+ $ this ->assertControllerName (Controller \ModuleController ::class);
529529 $ this ->assertActionName ('add ' );
530530 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
531531
@@ -586,7 +586,7 @@ public function testAddActionThrowsUnexpectedValueExceptionWhenRepositoryHasInsu
586586 ]
587587 );
588588
589- $ this ->assertControllerName (Controller \IndexController ::class);
589+ $ this ->assertControllerName (Controller \ModuleController ::class);
590590 $ this ->assertActionName ('add ' );
591591 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
592592
@@ -675,7 +675,7 @@ public function testAddActionThrowsUnexpectedValueExceptionWhenRepositoryIsNotAM
675675 ]
676676 );
677677
678- $ this ->assertControllerName (Controller \IndexController ::class);
678+ $ this ->assertControllerName (Controller \ModuleController ::class);
679679 $ this ->assertActionName ('add ' );
680680 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
681681
@@ -759,7 +759,7 @@ public function testAddActionRegistersRepositoryIfPermissionsAreSufficientAndItI
759759 ]
760760 );
761761
762- $ this ->assertControllerName (Controller \IndexController ::class);
762+ $ this ->assertControllerName (Controller \ModuleController ::class);
763763 $ this ->assertActionName ('add ' );
764764 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
765765
@@ -772,7 +772,7 @@ public function testRemoveActionRedirectsIfNotAuthenticated()
772772
773773 $ this ->dispatch ('/module/remove ' );
774774
775- $ this ->assertControllerName (Controller \IndexController ::class);
775+ $ this ->assertControllerName (Controller \ModuleController ::class);
776776 $ this ->assertActionName ('remove ' );
777777 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
778778
@@ -793,7 +793,7 @@ public function testRemoveActionThrowsUnexpectedValueExceptionIfNotPostedTo($met
793793 $ method
794794 );
795795
796- $ this ->assertControllerName (Controller \IndexController ::class);
796+ $ this ->assertControllerName (Controller \ModuleController ::class);
797797 $ this ->assertActionName ('remove ' );
798798 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
799799
@@ -846,7 +846,7 @@ public function testRemoveActionThrowsRuntimeExceptionIfUnableToFetchRepositoryM
846846 ]
847847 );
848848
849- $ this ->assertControllerName (Controller \IndexController ::class);
849+ $ this ->assertControllerName (Controller \ModuleController ::class);
850850 $ this ->assertActionName ('remove ' );
851851 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
852852
@@ -907,7 +907,7 @@ public function testRemoveActionThrowsUnexpectedValueExceptionWhenRepositoryHasI
907907 ]
908908 );
909909
910- $ this ->assertControllerName (Controller \IndexController ::class);
910+ $ this ->assertControllerName (Controller \ModuleController ::class);
911911 $ this ->assertActionName ('remove ' );
912912 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
913913
@@ -982,7 +982,7 @@ public function testRemoveActionThrowsUnexpectedValueExceptionWhenRepositoryNotP
982982 ]
983983 );
984984
985- $ this ->assertControllerName (Controller \IndexController ::class);
985+ $ this ->assertControllerName (Controller \ModuleController ::class);
986986 $ this ->assertActionName ('remove ' );
987987 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_500 );
988988
@@ -1067,7 +1067,7 @@ public function testRemoveActionDeletesModuleIfPermissionsAreSufficientAndItHasB
10671067 ]
10681068 );
10691069
1070- $ this ->assertControllerName (Controller \IndexController ::class);
1070+ $ this ->assertControllerName (Controller \ModuleController ::class);
10711071 $ this ->assertActionName ('remove ' );
10721072 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_302 );
10731073
@@ -1107,7 +1107,7 @@ public function testViewActionSetsHttp404ResponseCodeIfModuleNotFound()
11071107
11081108 $ this ->dispatch ($ url );
11091109
1110- $ this ->assertControllerName (Controller \IndexController ::class);
1110+ $ this ->assertControllerName (Controller \ModuleController ::class);
11111111 $ this ->assertActionName ('not-found ' );
11121112 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_404 );
11131113 }
@@ -1164,7 +1164,7 @@ public function testViewActionSetsHttp404ResponseCodeIfRepositoryMetaDataNotFoun
11641164
11651165 $ this ->dispatch ($ url );
11661166
1167- $ this ->assertControllerName (Controller \IndexController ::class);
1167+ $ this ->assertControllerName (Controller \ModuleController ::class);
11681168 $ this ->assertActionName ('not-found ' );
11691169 $ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_404 );
11701170 }
@@ -1221,7 +1221,7 @@ public function testViewActionCanBeAccessed()
12211221
12221222 $ this ->dispatch ($ url );
12231223
1224- $ this ->assertControllerName (Controller \IndexController ::class);
1224+ $ this ->assertControllerName (Controller \ModuleController ::class);
12251225 $ this ->assertActionName ('view ' );
12261226 }
12271227
0 commit comments