File tree Expand file tree Collapse file tree 1 file changed +9
-29
lines changed Expand file tree Collapse file tree 1 file changed +9
-29
lines changed Original file line number Diff line number Diff line change 8
8
use Laravel \Boost \Install \GuidelineConfig ;
9
9
use Laravel \Boost \Install \Herd ;
10
10
use Laravel \Roster \Roster ;
11
- use Orchestra \Testbench \Concerns \CreatesApplication ;
12
-
13
- // Create a simple class that uses Orchestra Testbench to bootstrap Laravel
14
- $ testbench = new class
15
- {
16
- use CreatesApplication;
17
-
18
- protected function getPackageProviders ($ app )
19
- {
20
- // No need to register Laravel Boost since we're just using Blade
21
- return [];
22
- }
23
-
24
- protected function defineEnvironment ($ app )
25
- {
26
- // Set a .test URL to enable Herd guidelines if needed
27
- $ app ['config ' ]->set ('app.url ' , 'http://localhost.test ' );
28
- }
29
-
30
- public function bootstrap ()
31
- {
32
- $ app = $ this ->createApplication ();
33
-
34
- return $ app ;
35
- }
36
- };
37
-
38
- // Bootstrap the Laravel application
39
- $ app = $ testbench ->bootstrap ();
11
+ use Orchestra \Testbench \Foundation \Application as Testbench ;
12
+ use Orchestra \Testbench \Foundation \Config as TestbenchConfig ;
13
+
14
+ // Bootstrap the Laravel application using Testbench
15
+ $ app = Testbench::createFromConfig (new TestbenchConfig ([
16
+ 'env ' => [
17
+ 'APP_URL=http://localhost.test ' ,
18
+ ],
19
+ ]), options: ['enables_package_discoveries ' => false ]);
40
20
41
21
// Create a mock Roster that returns ALL packages from .ai/ directory
42
22
$ mockRoster = new class extends Roster
You can’t perform that action at this time.
0 commit comments