File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,10 +164,10 @@ public function it_can_register_a_post_route(): void
164164 ->method ('post ' )
165165 ->register ();
166166
167- foreach ($ routes as $ route ) {
167+ foreach (locales () as $ locale ) {
168168 $ this ->assertContains (
169169 'POST ' ,
170- $ route ->methods
170+ $ routes -> getByName ( "{ $ locale } .test " ) ->methods
171171 );
172172 }
173173 }
@@ -532,10 +532,16 @@ public function the_default_home_page_can_be_registered_without_prefix(): void
532532 /** @test **/
533533 public function a_route_can_be_registered_with_a_middleware (): void
534534 {
535- Route::multilingual ('/ ' )->middleware ('web ' );
535+ $ routes = Route::multilingual ('/ ' )
536+ ->middleware ('web ' )
537+ ->name ('home ' )
538+ ->register ();
536539
537- foreach (Route::getRoutes () as $ route ) {
538- $ this ->assertContains ('web ' , data_get ($ route , 'action.middleware ' ));
540+ foreach (locales () as $ locale ) {
541+ $ this ->assertContains (
542+ 'web ' ,
543+ data_get ($ routes ->getByName ("{$ locale }.home " ), 'action.middleware ' )
544+ );
539545 }
540546 }
541547
You can’t perform that action at this time.
0 commit comments