From 113633c492a421099988c332bdfc98e5a8d49995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mike=C5=A1?= Date: Sun, 11 Dec 2022 17:39:56 +0100 Subject: [PATCH] Added CreatesApplication strict typing See https://github.com/nunomaduro/larastan/pull/1451#issuecomment-1345599444 --- tests/Traits/CreatesApplication.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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.