Skip to content

Commit

Permalink
Use the new render mocking helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent 3421778 commit 57be59e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/framework/tests/Unit/IncludesFacadeUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class IncludesFacadeUnitTest extends UnitTestCase

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

protected function setUp(): void
{
Expand All @@ -36,7 +37,6 @@ protected function setUp(): void

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

protected function tearDown(): void
Expand Down
6 changes: 1 addition & 5 deletions packages/framework/tests/Unit/NavigationItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ public static function setUpBeforeClass(): void

self::needsKernel();
self::mockConfig();
}

protected function setUp(): void
{
Render::swap(new RenderData());
self::mockRender();
}

public function testConstruct()
Expand Down
3 changes: 1 addition & 2 deletions packages/framework/tests/Unit/RenderHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ class RenderHelperTest extends UnitTestCase

protected function setUp(): void
{
parent::setUp();
self::mockRender();

Render::swap(new RenderData());
View::swap(Mockery::mock(Factory::class)->makePartial());
}

Expand Down

0 comments on commit 57be59e

Please sign in to comment.