Skip to content

Commit

Permalink
Refactor unit test to use the unit test case
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 10, 2024
1 parent 8319a4d commit cb7e1c7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions packages/framework/tests/Unit/Facades/AuthorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,31 @@

namespace Hyde\Framework\Testing\Unit\Facades;

use Hyde\Hyde;
use Hyde\Facades\Author;
use Hyde\Framework\Features\Blogging\Models\PostAuthor;
use Hyde\Testing\TestCase;
use Hyde\Testing\UnitTestCase;

/**
* @covers \Hyde\Facades\Author
*/
class AuthorTest extends TestCase
class AuthorTest extends UnitTestCase
{
protected static bool $needsKernel = true;

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

static $config = null;

if ($config === null) {
$config = require_once Hyde::path('config/hyde.php');
}

self::mockConfig(['hyde' => $config]);
}

public function testCreate()
{
$author = Author::create('John Doe', 'https://johndoe.com');
Expand Down

0 comments on commit cb7e1c7

Please sign in to comment.