Skip to content

Commit

Permalink
Use the new mocking shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent 021556c commit 9705989
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/testing/src/Common/BaseHydePageUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Illuminate\View\Factory;
use Hyde\Testing\UnitTestCase;
use Hyde\Support\Facades\Render;
use Hyde\Support\Models\RenderData;
use Illuminate\Support\Facades\View;
use Hyde\Testing\CreatesTemporaryFiles;

Expand All @@ -27,6 +26,7 @@ protected function setUp(): void
{
self::setupKernel();
self::mockConfig();
self::mockCurrentRouteKey();

View::swap($mock = Mockery::mock(Factory::class, [
'make' => Mockery::mock(Factory::class, [
Expand All @@ -39,8 +39,6 @@ protected function setUp(): void
]));
app()->bind(\Illuminate\Contracts\View\Factory::class, fn () => $mock);
app()->bind('view', fn () => $mock);

Render::swap(new RenderData());
}

protected function tearDown(): void
Expand Down

0 comments on commit 9705989

Please sign in to comment.