Skip to content

Commit 9995e4d

Browse files
committed
Fix MockResponse::fromFile is too recent
1 parent a6a3766 commit 9995e4d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Icons/tests/Unit/IconifyTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,11 @@ public function testGetMetadata(): void
125125

126126
public function testFetchSvg(): void
127127
{
128-
$responseFile = __DIR__.'/../Fixtures/Iconify/icon.svg';
129128
$client = new MockHttpClient([
130-
MockResponse::fromFile(__DIR__.'/../Fixtures/Iconify/collections.json', ['response_headers' => ['content-type' => 'application/json']]),
131-
MockResponse::fromFile($responseFile),
129+
new MockResponse(file_get_contents(__DIR__.'/../Fixtures/Iconify/collections.json'), [
130+
'response_headers' => ['content-type' => 'application/json']
131+
]),
132+
new MockResponse(file_get_contents(__DIR__.'/../Fixtures/Iconify/icon.svg')),
132133
]);
133134
$iconify = new Iconify(new NullAdapter(), 'https://localhost', $client);
134135

0 commit comments

Comments
 (0)