Skip to content

Commit 8c00df0

Browse files
authored
fix: manually kernel bootstrap TestCase::class (#366)
1 parent 373a3a5 commit 8c00df0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/System/Integrate/Testing/TestCase.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use System\Http\Response;
1010
use System\Integrate\Application;
1111
use System\Integrate\Http\Karnel;
12+
use System\Integrate\ServiceProvider;
13+
use System\Support\Facades\Facade;
1214

1315
class TestCase extends BaseTestCase
1416
{
@@ -19,12 +21,14 @@ class TestCase extends BaseTestCase
1921
protected function setUp(): void
2022
{
2123
// create app
22-
$this->karnel = $this->app->make(Karnel::class);
24+
$this->karnel = $this->app->make(Karnel::class)->bootstrap();
2325
}
2426

2527
protected function tearDown(): void
2628
{
2729
$this->app->flush();
30+
Facade::flushInstance();
31+
ServiceProvider::flushModule();
2832
unset($this->app);
2933
unset($this->karnel);
3034
}

0 commit comments

Comments
 (0)