diff --git a/packages/framework/tests/Unit/IncludesFacadeUnitTest.php b/packages/framework/tests/Unit/IncludesFacadeUnitTest.php index a47609e4c21..f17d296a87e 100644 --- a/packages/framework/tests/Unit/IncludesFacadeUnitTest.php +++ b/packages/framework/tests/Unit/IncludesFacadeUnitTest.php @@ -10,9 +10,7 @@ use Hyde\Support\Includes; use AllowDynamicProperties; use Hyde\Testing\UnitTestCase; -use Hyde\Support\Facades\Render; use Illuminate\Support\HtmlString; -use Hyde\Support\Models\RenderData; use Illuminate\Support\Facades\Blade; use Illuminate\Filesystem\Filesystem; use Hyde\Testing\MocksKernelFeatures; @@ -29,14 +27,13 @@ class IncludesFacadeUnitTest extends UnitTestCase protected static bool $needsKernel = true; protected static bool $needsConfig = true; + protected static bool $needsRender = true; protected function setUp(): void { Blade::swap(Mockery::mock()); - $this->setupTestKernel(); - $this->kernel->setRoutes(collect()); - Render::swap(new RenderData()); + $this->setupTestKernel()->setRoutes(collect()); } protected function tearDown(): void diff --git a/packages/testing/src/MocksKernelFeatures.php b/packages/testing/src/MocksKernelFeatures.php index 3f89d509021..3e942a12419 100644 --- a/packages/testing/src/MocksKernelFeatures.php +++ b/packages/testing/src/MocksKernelFeatures.php @@ -42,11 +42,13 @@ protected function withPages(array $pages): static return $this; } - protected function setupTestKernel(): void + protected function setupTestKernel(): TestKernel { $this->kernel = new TestKernel(); HydeKernel::setInstance($this->kernel); + + return $this->kernel; } }