File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -163,11 +163,6 @@ public function publishFiles()
163163 */
164164 public function setupRoutes (Router $ router )
165165 {
166- if (app ()->runningUnitTests ()) {
167- $ this ->loadRoutesFrom (__DIR__ .'/routes/backpack/testing.php ' );
168-
169- return ;
170- }
171166 // by default, use the routes file provided in vendor
172167 $ routeFilePathInUse = __DIR__ .$ this ->routeFilePath ;
173168
Original file line number Diff line number Diff line change 33namespace Backpack \CRUD \Tests ;
44
55use Backpack \CRUD \BackpackServiceProvider ;
6+ use Illuminate \Support \Facades \Route ;
67use Orchestra \Testbench \TestCase ;
78
89abstract class BaseTest extends TestCase
@@ -15,6 +16,16 @@ abstract class BaseTest extends TestCase
1516 protected function setUp (): void
1617 {
1718 parent ::setUp ();
19+
20+ Route::group ([
21+ (array ) config ('backpack.base.web_middleware ' , 'web ' ),
22+ (array ) config ('backpack.base.middleware_key ' , 'admin ' ),
23+ 'prefix ' => config ('backpack.base.route_prefix ' , 'admin ' ),
24+ ],
25+ function () {
26+ Route::crud ('users ' , 'Backpack\CRUD\Tests\Unit\Http\Controllers\UserCrudController ' );
27+ }
28+ );
1829 }
1930
2031 protected function getPackageProviders ($ app )
You can’t perform that action at this time.
0 commit comments