Skip to content

Commit

Permalink
fix: generate nova test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
t0xas committed May 14, 2024
1 parent 806f7e8 commit 8d8aa93
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions stubs/nova_test.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

class Nova{{$entity}}Test extends TestCase
{
protected static $user;
protected static ${{$lower_entity}}State;
protected static User $user;
protected static ModelTestState ${{$lower_entity}}State;

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

self::$user = 1;
self::$user = User::find(1);
self::${{$lower_entity}}State ??= new ModelTestState({{$entity}}::class);

$this->skipDocumentationCollecting();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

class NovaPostTest extends TestCase
{
protected static $user;
protected static $postState;
protected static User $user;
protected static ModelTestState $postState;

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

self::$user = 1;
self::$user = User::find(1);
self::$postState ??= new ModelTestState(Post::class);

$this->skipDocumentationCollecting();
Expand Down

0 comments on commit 8d8aa93

Please sign in to comment.