@@ -13,21 +13,21 @@ class Nova{{$entity}}Test extends TestCase
1313 use NovaTestTrait;
1414
1515 protected static User $user;
16- protected static ModelTestState ${{ $lower_first_entity } } State;
16+ protected static ModelTestState ${{ $dromedary_entity } } State;
1717
1818 public function setUp(): void
1919 {
2020 parent::setUp();
2121
2222 self::$user ??= User::find(1);
23- self::${{ $lower_first_entity } } State ??= new ModelTestState({{ $entity } } ::class);
23+ self::${{ $dromedary_entity } } State ??= new ModelTestState({{ $entity } } ::class);
2424
2525 $this->skipDocumentationCollecting();
2626 }
2727
2828 public function testCreate(): void
2929 {
30- $data = $this->getJsonFixture('create_{{ $lower_entity } } _request.json');
30+ $data = $this->getJsonFixture('create_{{ $snake_entity } } _request.json');
3131
3232 $response = $this->actingAs(self::$user, 'web')->json('post', '/nova-api/{{ $url_path } } ', $data);
3333
@@ -37,15 +37,15 @@ public function testCreate(): void
3737 $response->assertCreated();
3838@endif
3939
40- $this->assertEqualsFixture('create_{{ $lower_entity } } _response.json', $response->json());
40+ $this->assertEqualsFixture('create_{{ $snake_entity } } _response.json', $response->json());
4141
4242 // TODO: Need to remove after first successful start
43- self::${{ $lower_first_entity } } State->assertChangesEqualsFixture('create_{{ $lower_entities } } _state.json', true);
43+ self::${{ $dromedary_entity } } State->assertChangesEqualsFixture('create_{{ $lower_entities } } _state.json', true);
4444 }
4545
4646 public function testCreateNoAuth(): void
4747 {
48- $data = $this->getJsonFixture('create_{{ $lower_entity } } _request.json');
48+ $data = $this->getJsonFixture('create_{{ $snake_entity } } _request.json');
4949
5050 $response = $this->json('post', '/nova-api/{{ $url_path } } ', $data);
5151
@@ -55,7 +55,7 @@ public function testCreateNoAuth(): void
5555 $response->assertUnauthorized();
5656@endif
5757
58- self::${{ $lower_first_entity } } State->assertNotChanged();
58+ self::${{ $dromedary_entity } } State->assertNotChanged();
5959 }
6060
6161 public function testCreateValidationError(): void
@@ -71,12 +71,12 @@ public function testCreateValidationError(): void
7171 // TODO: Need to remove after first successful start
7272 $this->assertEqualsFixture('create_validation_response.json', $response->json(), true);
7373
74- self::${{ $lower_first_entity } } State->assertNotChanged();
74+ self::${{ $dromedary_entity } } State->assertNotChanged();
7575 }
7676
7777 public function testUpdate(): void
7878 {
79- $data = $this->getJsonFixture('update_{{ $lower_entity } } _request.json');
79+ $data = $this->getJsonFixture('update_{{ $snake_entity } } _request.json');
8080
8181 $response = $this->actingAs(self::$user, 'web')->json('put', '/nova-api/{{ $url_path } } /1', $data);
8282
@@ -87,12 +87,12 @@ public function testUpdate(): void
8787@endif
8888
8989 // TODO: Need to remove after first successful start
90- self::${{ $lower_first_entity } } State->assertChangesEqualsFixture('update_{{ $lower_entities } } _state.json', true);
90+ self::${{ $dromedary_entity } } State->assertChangesEqualsFixture('update_{{ $lower_entities } } _state.json', true);
9191 }
9292
9393 public function testUpdateNotExists(): void
9494 {
95- $data = $this->getJsonFixture('update_{{ $lower_entity } } _request.json');
95+ $data = $this->getJsonFixture('update_{{ $snake_entity } } _request.json');
9696
9797 $response = $this->actingAs(self::$user, 'web')->json('put', '/nova-api/{{ $url_path } } /0', $data);
9898
@@ -105,7 +105,7 @@ public function testUpdateNotExists(): void
105105
106106 public function testUpdateNoAuth(): void
107107 {
108- $data = $this->getJsonFixture('update_{{ $lower_entity } } _request.json');
108+ $data = $this->getJsonFixture('update_{{ $snake_entity } } _request.json');
109109
110110 $response = $this->json('put', '/nova-api/{{ $url_path } } /1', $data);
111111
@@ -157,7 +157,7 @@ public function testDelete(): void
157157@endif
158158
159159 // TODO: Need to remove after first successful start
160- self::${{ $lower_first_entity } } State->assertChangesEqualsFixture('delete_{{ $lower_entities } } _state.json', true);
160+ self::${{ $dromedary_entity } } State->assertChangesEqualsFixture('delete_{{ $lower_entities } } _state.json', true);
161161 }
162162
163163 public function testDeleteNotExists(): void
@@ -197,7 +197,7 @@ public function testGet(): void
197197@endif
198198
199199 // TODO: Need to remove after first successful start
200- $this->assertEqualsFixture('get_{{ $lower_entity } } _response.json', $response->json(), true);
200+ $this->assertEqualsFixture('get_{{ $snake_entity } } _response.json', $response->json(), true);
201201 }
202202
203203 public function testGetNotExists(): void
@@ -281,7 +281,7 @@ public function testRun{{$entity}}Actions($action, $request, ${{$lower_entities}
281281 $this->assertEmpty($response->getContent());
282282
283283 // TODO: Need to remove after first successful start
284- self::${{ $lower_first_entity } } State->assertChangesEqualsFixture(${{ $lower_entities } } StateFixture, true);
284+ self::${{ $dromedary_entity } } State->assertChangesEqualsFixture(${{ $lower_entities } } StateFixture, true);
285285 }
286286
287287 public function get{{ $entity } } ActionsData(): array
@@ -292,7 +292,7 @@ public function get{{$entity}}ActionsData(): array
292292 'request' => [
293293 'resources' => '1,2',
294294 ],
295- 'response_fixture' => 'get_{{ $lower_entity } } _actions_{{ $action [' fixture' ]} } .json',
295+ 'response_fixture' => 'get_{{ $snake_entity } } _actions_{{ $action [' fixture' ]} } .json',
296296 ],
297297@endforeach
298298 ];
@@ -323,7 +323,7 @@ public function get{{$entity}}FiltersData(): array
323323 'request' => [
324324 '{{ $filter [' name' ]} } ' => $this->novaSearchParams(['search term']),
325325 ],
326- 'response_fixture' => 'filter_{{ $lower_entity } } _by_{{ $filter [' fixture_name' ]} } .json',
326+ 'response_fixture' => 'filter_{{ $snake_entity } } _by_{{ $filter [' fixture_name' ]} } .json',
327327 ],
328328@endforeach
329329 ];
0 commit comments