From 2e692c20b3d6df704540db58142f55c873ca9fd6 Mon Sep 17 00:00:00 2001 From: Wouter Vanelslander Date: Fri, 22 Sep 2023 11:43:16 +0200 Subject: [PATCH] Updated Guzzle to 7.x --- composer.json | 2 +- test/SearchClientTest.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index fe9965b..61011ba 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "require": { "php": "^7.1 || ^8.0", - "guzzlehttp/guzzle": "~6.0", + "guzzlehttp/guzzle": "^7.0", "yogarine/doctrine-annotation-autoload": "^0.3.0", "gammadia/jms-serializer-1.x": "^1.14", "simple-bus/jms-serializer-bridge": "^1.0" diff --git a/test/SearchClientTest.php b/test/SearchClientTest.php index 5ce5b33..e0386cf 100644 --- a/test/SearchClientTest.php +++ b/test/SearchClientTest.php @@ -8,9 +8,11 @@ use CultuurNet\SearchV3\ValueObjects\PagedCollection; use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; +use GuzzleHttp\Psr7\Utils; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Http\Message\ResponseInterface; +use Psr\Http\Message\StreamInterface; final class SearchClientTest extends TestCase { @@ -63,9 +65,10 @@ public function provideResponseMockup(): ResponseInterface $response = $this->getMockBuilder(ResponseInterface::class) ->disableOriginalConstructor() ->getMock(); + $response->expects($this->once()) ->method('getBody') - ->willReturn('test response'); + ->willReturn(Utils::streamFor('test response')); return $response; }