Skip to content

Commit 1fedc1d

Browse files
committed
fix: template for generate nova test cases
1 parent f36d7df commit 1fedc1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/fixtures/NovaTestGeneratorTest/created_resource_test.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public function setUp(): void
1414
{
1515
parent::setUp();
1616

17-
self::$user = User::find(1);
17+
self::$user ??= User::find(1);
1818
self::$postState ??= new ModelTestState(Post::class);
1919

2020
$this->skipDocumentationCollecting();
@@ -43,7 +43,7 @@ public function testCreateNoAuth(): void
4343
$response->assertUnauthorized();
4444

4545
self::$postState->assertNotChanged();
46-
}
46+
}
4747

4848
public function testCreateValidationError(): void
4949
{
@@ -252,13 +252,13 @@ public function getPostFiltersData(): array
252252
return [
253253
[
254254
'filters' => [
255-
'TextField:description_field' => 'search term',
255+
'TextField:description_field' => ['search term'],
256256
],
257257
'response_fixture' => 'filter_post_by_text_field.json',
258258
],
259259
[
260260
'filters' => [
261-
'RonasIT\Support\Tests\Support\CreatedAtFilter' => 'search term',
261+
'RonasIT\Support\Tests\Support\CreatedAtFilter' => ['search term'],
262262
],
263263
'response_fixture' => 'filter_post_by_created_at_filter.json',
264264
],

0 commit comments

Comments
 (0)