Skip to content

Commit

Permalink
Simplify test mock setup
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent e02bc9d commit f7ee783
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions packages/framework/tests/Unit/NavItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,9 @@
*/
class NavItemTest extends UnitTestCase
{
public static function setUpBeforeClass(): void
{
self::$hasSetUpKernel = false;

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

protected function setUp(): void
{
Render::swap(new RenderData());
}
protected static bool $needsKernel = true;
protected static bool $needsConfig = true;
protected static bool $needsRender = true;

public function testConstruct()
{
Expand Down Expand Up @@ -129,6 +120,8 @@ public function testForRouteWithRouteKey()

public function testForRouteWithMissingRouteKey()
{
self::resetKernel();

$this->expectException(RouteNotFoundException::class);
NavItem::forRoute('foo', 'foo');
}
Expand Down

0 comments on commit f7ee783

Please sign in to comment.