Skip to content

Commit

Permalink
Refactor to use the unit test case
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 9, 2024
1 parent f40c204 commit 1da2b96
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions packages/framework/tests/Unit/HydeFileHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,29 @@

namespace Hyde\Framework\Testing\Unit;

use Mockery;
use Illuminate\View\Factory;
use Hyde\Testing\UnitTestCase;
use Hyde\Foundation\Facades\Routes;
use Hyde\Hyde;
use Hyde\Support\Facades\Render;
use Hyde\Testing\TestCase;
use Illuminate\Support\Facades\View;

/**
* @covers \Hyde\Foundation\HydeKernel
*/
class HydeFileHelpersTest extends TestCase
class HydeFileHelpersTest extends UnitTestCase
{
protected static bool $needsKernel = true;
protected static bool $needsConfig = true;

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

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

public function testCurrentPageReturnsCurrentPageViewProperty()
{
Render::share('routeKey', 'foo');
Expand Down

0 comments on commit 1da2b96

Please sign in to comment.