Skip to content

Commit

Permalink
Update unit test to mock the kernel routes
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 25, 2024
1 parent 60786a5 commit 75fc296
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/framework/tests/Unit/IncludesFacadeUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
use Hyde\Hyde;
use Hyde\Support\Includes;
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;

/**
* @covers \Hyde\Support\Includes
Expand All @@ -20,6 +23,8 @@
*/
class IncludesFacadeUnitTest extends UnitTestCase
{
use MocksKernelFeatures;

protected static bool $needsKernel = true;
protected static bool $needsConfig = true;

Expand All @@ -28,6 +33,10 @@ protected function setUp(): void
parent::setUp();

Blade::swap(Mockery::mock());

$this->setupTestKernel();
$this->kernel->setRoutes(collect());
Render::swap(new RenderData());
}

protected function tearDown(): void
Expand Down

0 comments on commit 75fc296

Please sign in to comment.