From 0d3f1726ad16e2193bf7bc77f846def74f914959 Mon Sep 17 00:00:00 2001 From: Aliaksei Sanikovich Date: Sat, 9 Mar 2024 15:59:34 +0100 Subject: [PATCH] Call forgetBootstrappers after test --- src/Codeception/Module/Laravel.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Codeception/Module/Laravel.php b/src/Codeception/Module/Laravel.php index a1bf8d9..129c5b7 100644 --- a/src/Codeception/Module/Laravel.php +++ b/src/Codeception/Module/Laravel.php @@ -24,6 +24,7 @@ use Codeception\Subscriber\ErrorHandler; use Codeception\TestInterface; use Codeception\Util\ReflectionHelper; +use Illuminate\Console\Application as Artisan; use Illuminate\Contracts\Config\Repository as Config; use Illuminate\Contracts\Foundation\Application as ApplicationContract; use Illuminate\Database\Connection; @@ -261,6 +262,8 @@ public function _after(TestInterface $test) unset($this->app[\Faker\Generator::class]); unset($this->app[\Illuminate\Database\Eloquent\Factory::class]); } + + Artisan::forgetBootstrappers(); } /**