Skip to content

Commit 35fef89

Browse files
Tweaked tests
1 parent 3a306fc commit 35fef89

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/HttpClient/Message/ResponseMediatorTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Gitlab\Exception\RuntimeException;
88
use Gitlab\HttpClient\Message\ResponseMediator;
99
use GuzzleHttp\Psr7\Response;
10-
use function GuzzleHttp\Psr7\stream_for;
10+
use GuzzleHttp\Psr7\Utils;
1111
use PHPUnit\Framework\TestCase;
1212

1313
/**
@@ -21,7 +21,7 @@ public function testGetContent(): void
2121
$response = new Response(
2222
200,
2323
['Content-Type' => 'application/json'],
24-
stream_for('{"foo": "bar"}')
24+
Utils::streamFor('{"foo": "bar"}')
2525
);
2626

2727
$this->assertSame(['foo' => 'bar'], ResponseMediator::getContent($response));
@@ -32,7 +32,7 @@ public function testGetContentNotJson(): void
3232
$response = new Response(
3333
200,
3434
[],
35-
stream_for('foobar')
35+
Utils::streamFor('foobar')
3636
);
3737

3838
$this->assertSame('foobar', ResponseMediator::getContent($response));
@@ -43,7 +43,7 @@ public function testGetContentInvalidJson(): void
4343
$response = new Response(
4444
200,
4545
['Content-Type' => 'application/json'],
46-
stream_for('foobar')
46+
Utils::streamFor('foobar')
4747
);
4848

4949
$this->expectException(RuntimeException::class);
@@ -57,7 +57,7 @@ public function testGetErrrorMessageInvalidJson(): void
5757
$response = new Response(
5858
200,
5959
['Content-Type' => 'application/json'],
60-
stream_for('foobar')
60+
Utils::streamFor('foobar')
6161
);
6262

6363
$this->assertNull(ResponseMediator::getErrorMessage($response));

0 commit comments

Comments
 (0)