Skip to content

Commit

Permalink
Remove unnecessary setup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent 64638fe commit 542f05c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions packages/framework/tests/Unit/NavItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class NavItemTest extends UnitTestCase
{
public static function setUpBeforeClass(): void
{
self::$hasSetUpKernel = false;

self::needsKernel();
self::mockConfig();
}
Expand Down
7 changes: 1 addition & 6 deletions packages/testing/src/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,13 @@

abstract class UnitTestCase extends BaseTestCase
{
protected static bool $hasSetUpKernel = false;

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

protected static function needsKernel(): void
{
if (! self::$hasSetUpKernel) {
self::setupKernel();
}
self::setupKernel();
}

public static function setUpBeforeClass(): void
Expand All @@ -44,7 +40,6 @@ public static function setUpBeforeClass(): void
protected static function setupKernel(): void
{
HydeKernel::setInstance(new HydeKernel());
self::$hasSetUpKernel = true;
}

protected static function resetKernel(): void
Expand Down

0 comments on commit 542f05c

Please sign in to comment.