Skip to content

Commit

Permalink
Fix HttpTransportTest using removed function
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Aug 2, 2021
1 parent 3d73313 commit bfab90c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Transport/HttpTransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use GuzzleHttp\Promise\RejectionException;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\Psr7\Utils;
use Http\Client\HttpAsyncClient as HttpAsyncClientInterface;
use Http\Promise\FulfilledPromise as HttpFullfilledPromise;
use Http\Promise\RejectedPromise as HttpRejectedPromise;
Expand All @@ -23,7 +24,6 @@
use Sentry\ResponseStatus;
use Sentry\Serializer\PayloadSerializerInterface;
use Sentry\Transport\HttpTransport;
use function GuzzleHttp\Psr7\stream_for;

final class HttpTransportTest extends TestCase
{
Expand Down Expand Up @@ -90,7 +90,7 @@ public function testSendTransactionAsEnvelope(): void
->method('createStream')
->with('{"foo":"bar"}')
->willReturnCallback(static function (string $content): StreamInterface {
return stream_for($content);
return Utils::streamFor($content);
});

$this->httpClient->expects($this->once())
Expand Down Expand Up @@ -136,7 +136,7 @@ public function testSend(int $httpStatusCode, string $expectedPromiseStatus, Res
->method('createStream')
->with('{"foo":"bar"}')
->willReturnCallback(static function (string $content): StreamInterface {
return stream_for($content);
return Utils::streamFor($content);
});

$this->requestFactory->expects($this->once())
Expand Down Expand Up @@ -221,7 +221,7 @@ public function testSendReturnsRejectedPromiseIfSendingFailedDueToHttpClientExce
->method('createStream')
->with('{"foo":"bar"}')
->willReturnCallback(static function (string $content): StreamInterface {
return stream_for($content);
return Utils::streamFor($content);
});

$this->httpClient->expects($this->once())
Expand Down

0 comments on commit bfab90c

Please sign in to comment.