File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 55use Carbon \Carbon ;
66use Illuminate \Console \Command ;
77use Illuminate \Filesystem \Filesystem ;
8+ use function Pest \Laravel \artisan ;
89
910it ('generates models and migrations from DBML ' , function () {
1011 $ filesystem = new Filesystem ;
2728 try {
2829 $ fixture = __DIR__ .'/../Fixtures/simple.dbml ' ;
2930
30- $ this -> artisan ('generate:dbml ' , ['file ' => $ fixture , '--force ' => true ])
31+ artisan ('generate:dbml ' , ['file ' => $ fixture , '--force ' => true ])
3132 ->assertExitCode (Command::SUCCESS );
3233
3334 expect (file_exists ($ appPath .'/Models/User.php ' ))->toBeTrue ();
5556it ('fails when DBML file is missing ' , function () {
5657 $ missing = base_path ('tests/Fixtures/missing-file.dbml ' );
5758
58- $ this -> artisan ('generate:dbml ' , ['file ' => $ missing ])
59+ artisan ('generate:dbml ' , ['file ' => $ missing ])
5960 ->expectsOutput ("File not found: $ missing " )
6061 ->assertExitCode (Command::FAILURE );
6162});
Original file line number Diff line number Diff line change 44
55use Egyjs \DbmlToLaravel \DbmlToLaravelServiceProvider ;
66use Illuminate \Database \Eloquent \Factories \Factory ;
7+ use Illuminate \Testing \TestResponse ;
78use Orchestra \Testbench \TestCase as Orchestra ;
89
910class TestCase extends Orchestra
1011{
12+ /**
13+ * Holds the latest HTTP/test response so Testbench can reset it between tests.
14+ */
15+ protected static ?TestResponse $ latestResponse = null ;
16+
1117 protected function setUp (): void
1218 {
1319 parent ::setUp ();
You can’t perform that action at this time.
0 commit comments