Skip to content

Commit 7086043

Browse files
authored
Merge pull request #157 from RonasIT/147-tests-refactoring
refactor: remove useless json extensions
2 parents 23f32f0 + 5ccff56 commit 7086043

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

stubs/nova_test.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public static function getRun{{$entity}}ActionsData(): array
179179
'request' => [
180180
'resources' => '1,2',
181181
],
182-
'state' => 'run_{{$action['fixture']}}_state.json',
182+
'state' => 'run_{{$action['fixture']}}_state',
183183
],
184184
@endforeach
185185
];
@@ -204,7 +204,7 @@ public static function get{{$entity}}ActionsData(): array
204204
@foreach($actions as $action)
205205
[
206206
'resources' => [1, 2],
207-
'fixture' => 'get_{{$snake_entity}}_actions_{{$action['fixture']}}.json',
207+
'fixture' => 'get_{{$snake_entity}}_actions_{{$action['fixture']}}',
208208
],
209209
@endforeach
210210
];
@@ -229,7 +229,7 @@ public static function get{{$entity}}FiltersData(): array
229229
'request' => [
230230
'{{$filter['name']}}' => $this->novaSearchParams(['search term']),
231231
],
232-
'fixture' => 'filter_{{$snake_entity}}_by_{{$filter['fixture_name']}}.json',
232+
'fixture' => 'filter_{{$snake_entity}}_by_{{$filter['fixture_name']}}',
233233
],
234234
@endforeach
235235
];

stubs/test.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,14 @@ public static function getSearchFilters(): array
192192
return [
193193
[
194194
'filter' => ['all' => 1],
195-
'fixture' => 'search_all.json',
195+
'fixture' => 'search_all',
196196
],
197197
[
198198
'filter' => [
199199
'page' => 2,
200200
'per_page' => 2,
201201
],
202-
'fixture' => 'search_by_page_per_page.json',
202+
'fixture' => 'search_by_page_per_page',
203203
],
204204
];
205205
}

tests/fixtures/CommandTest/test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ public static function getSearchFilters(): array
9898
return [
9999
[
100100
'filter' => ['all' => 1],
101-
'fixture' => 'search_all.json',
101+
'fixture' => 'search_all',
102102
],
103103
[
104104
'filter' => [
105105
'page' => 2,
106106
'per_page' => 2,
107107
],
108-
'fixture' => 'search_by_page_per_page.json',
108+
'fixture' => 'search_by_page_per_page',
109109
],
110110
];
111111
}

tests/fixtures/NovaTestGeneratorTest/created_resource_test.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,14 @@ public static function getRunWelcomeBonusActionsData(): array
180180
'request' => [
181181
'resources' => '1,2',
182182
],
183-
'state' => 'run_publish_post_action_state.json',
183+
'state' => 'run_publish_post_action_state',
184184
],
185185
[
186186
'action' => UnPublishPostAction::class,
187187
'request' => [
188188
'resources' => '1,2',
189189
],
190-
'state' => 'run_un_publish_post_action_state.json',
190+
'state' => 'run_un_publish_post_action_state',
191191
],
192192
];
193193
}
@@ -210,11 +210,11 @@ public static function getWelcomeBonusActionsData(): array
210210
return [
211211
[
212212
'resources' => [1, 2],
213-
'fixture' => 'get_welcome_bonus_actions_publish_post_action.json',
213+
'fixture' => 'get_welcome_bonus_actions_publish_post_action',
214214
],
215215
[
216216
'resources' => [1, 2],
217-
'fixture' => 'get_welcome_bonus_actions_un_publish_post_action.json',
217+
'fixture' => 'get_welcome_bonus_actions_un_publish_post_action',
218218
],
219219
];
220220
}
@@ -237,13 +237,13 @@ public static function getWelcomeBonusFiltersData(): array
237237
'request' => [
238238
'TextField:description_field' => $this->novaSearchParams(['search term']),
239239
],
240-
'fixture' => 'filter_welcome_bonus_by_text_field.json',
240+
'fixture' => 'filter_welcome_bonus_by_text_field',
241241
],
242242
[
243243
'request' => [
244244
'RonasIT\Support\Tests\Support\NovaTestGeneratorTest\CreatedAtFilter' => $this->novaSearchParams(['search term']),
245245
],
246-
'fixture' => 'filter_welcome_bonus_by_created_at_filter.json',
246+
'fixture' => 'filter_welcome_bonus_by_created_at_filter',
247247
],
248248
];
249249
}

tests/fixtures/TestGeneratorTest/post_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,14 @@ public static function getSearchFilters(): array
137137
return [
138138
[
139139
'filter' => ['all' => 1],
140-
'fixture' => 'search_all.json',
140+
'fixture' => 'search_all',
141141
],
142142
[
143143
'filter' => [
144144
'page' => 2,
145145
'per_page' => 2,
146146
],
147-
'fixture' => 'search_by_page_per_page.json',
147+
'fixture' => 'search_by_page_per_page',
148148
],
149149
];
150150
}

tests/fixtures/TestGeneratorTest/post_test_read_delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ public static function getSearchFilters(): array
7979
return [
8080
[
8181
'filter' => ['all' => 1],
82-
'fixture' => 'search_all.json',
82+
'fixture' => 'search_all',
8383
],
8484
[
8585
'filter' => [
8686
'page' => 2,
8787
'per_page' => 2,
8888
],
89-
'fixture' => 'search_by_page_per_page.json',
89+
'fixture' => 'search_by_page_per_page',
9090
],
9191
];
9292
}

0 commit comments

Comments
 (0)