diff --git a/tests/Traits/CreatesApplication.php b/tests/Traits/CreatesApplication.php index f1a0de7dde..5619acb7de 100644 --- a/tests/Traits/CreatesApplication.php +++ b/tests/Traits/CreatesApplication.php @@ -22,7 +22,10 @@ public function createApplication(): Application /** @var Application $app */ $app = require __DIR__ . '/../../bootstrap/app.php'; - $this->artisan = $app->make(Artisan::class); + $artisan = $app->make(Artisan::class); + assert($artisan instanceof Kernel); + + $this->artisan = $artisan; $this->artisan->bootstrap(); // Unless the DB is stored in memory, we need to migrate the DB only once for the whole test suite.