Skip to content

Commit faf1182

Browse files
Fix test
1 parent 08572ae commit faf1182

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/Fixtures/TestController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function transformerCollectionTagWithModel()
165165
}
166166

167167
/**
168-
* @responseFile app/response_test.json
168+
* @responseFile response_test.json
169169
*/
170170
public function responseFileTag()
171171
{

tests/Unit/GeneratorTestCase.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ public function can_call_route_and_generate_response()
270270
public function can_parse_response_file_tag()
271271
{
272272
// copy file to storage
273-
$fixtureFileJson = file_get_contents(__DIR__.'/../Fixtures/response_test.json');
274-
Storage::put('response_test.json', $fixtureFileJson);
273+
$filePath = __DIR__.'/../Fixtures/response_test.json';
274+
$fixtureFileJson = file_get_contents($filePath);
275+
copy ($filePath, storage_path('response_test.json'));
275276

276277
$route = $this->createRoute('GET', '/responseFileTag', 'responseFileTag');
277278
$parsed = $this->generator->processRoute($route);
@@ -283,7 +284,7 @@ public function can_parse_response_file_tag()
283284
$fixtureFileJson
284285
);
285286

286-
Storage::delete('response_test.json');
287+
unlink(storage_path('response_test.json'));
287288
}
288289

289290
/** @test */

0 commit comments

Comments
 (0)