File tree Expand file tree Collapse file tree 5 files changed +12
-12
lines changed
PackageServiceProviderTests Expand file tree Collapse file tree 5 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public function boot()
88
88
}
89
89
90
90
foreach ($ this ->package ->routeFileNames as $ routeFileName ) {
91
- $ this ->loadRoutesFrom ($ this ->package ->basePath ('/../routes/ ' ) . $ routeFileName . ' . php' );
91
+ $ this ->loadRoutesFrom ("{ $ this ->package ->basePath ('/../routes/ ' )}{ $ routeFileName} . php" );
92
92
}
93
93
94
94
$ this ->packageBooted ();
Original file line number Diff line number Diff line change @@ -13,22 +13,22 @@ public function configurePackage(Package $package)
13
13
14
14
$ package
15
15
->name ('laravel-package-tools ' )
16
- ->hasRoutes (['web ' , 'admin ' ]);
16
+ ->hasRoutes (['web ' , 'other ' ]);
17
17
}
18
18
19
19
/** @test */
20
20
public function it_can_load_the_route ()
21
21
{
22
- $ response = $ this ->get ('/larsklopstra ' );
22
+ $ response = $ this ->get ('my-route ' );
23
23
24
- $ response ->assertSeeText ('Hello Spatie! ' );
24
+ $ response ->assertSeeText ('my response ' );
25
25
}
26
26
27
27
/** @test */
28
28
public function it_can_load_multiple_route ()
29
29
{
30
- $ adminResponse = $ this ->get ('/admin ' );
30
+ $ adminResponse = $ this ->get ('other-route ' );
31
31
32
- $ adminResponse ->assertSeeText ('Admins only ' );
32
+ $ adminResponse ->assertSeeText ('other response ' );
33
33
}
34
34
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \Facades \Route ;
4
+
5
+ Route::get ('other-route ' , fn () => 'other response ' );
Original file line number Diff line number Diff line change 2
2
3
3
use Illuminate \Support \Facades \Route ;
4
4
5
- Route::get ('larsklopstra ' , fn () => 'Hello Spatie! ' );
5
+ Route::get ('my-route ' , fn () => 'my response ' );
You can’t perform that action at this time.
0 commit comments