File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/Illuminate/Foundation/Testing Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ trait WithCachedRoutes
1010
1111 protected function setUpWithCachedRoutes (): void
1212 {
13- $ this ->app ->instance ('routes.cached ' , true );
14-
1513 if ((self ::$ cachedRoutes ?? null ) === null ) {
1614 $ routes = $ this ->app ['router ' ]->getRoutes ();
1715 $ routes ->refreshNameLookups ();
1816 $ routes ->refreshActionLookups ();
1917 self ::$ cachedRoutes = $ routes ;
2018 }
2119
20+ $ this ->app ->instance ('routes.cached ' , true );
21+
2222 RouteServiceProvider::loadCachedRoutesUsing (
2323 static fn () => app ('router ' )->setCompiledRoutes (self ::$ cachedRoutes )
2424 );
Original file line number Diff line number Diff line change 99use Illuminate \Foundation \Events \LocaleUpdated ;
1010use Illuminate \Support \ServiceProvider ;
1111use Mockery as m ;
12- use PHPUnit \Framework \Attributes \TestWith ;
1312use PHPUnit \Framework \TestCase ;
1413use stdClass ;
1514use Symfony \Component \HttpKernel \Exception \HttpException ;
@@ -621,7 +620,8 @@ public function test_routes_are_cached()
621620 public function test_routes_are_not_cached_by_instance_falls_back_to_file ()
622621 {
623622 $ app = new Application ();
624- $ files = new class {
623+ $ files = new class
624+ {
625625 public string $ pathRequested ;
626626 public function exists (string $ path ): bool
627627 {
You can’t perform that action at this time.
0 commit comments