From b4dbb508db15437f9fd72027109e2d5a2549d78e Mon Sep 17 00:00:00 2001 From: lisam Date: Thu, 6 Jul 2023 15:12:00 +0200 Subject: [PATCH] Changed Tests --- tests/Unit/Api/MemberSkillsTest.php | 3 ++- tests/Unit/Api/OrganisationTest.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Api/MemberSkillsTest.php b/tests/Unit/Api/MemberSkillsTest.php index 1635536..9991c7a 100644 --- a/tests/Unit/Api/MemberSkillsTest.php +++ b/tests/Unit/Api/MemberSkillsTest.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SkillDisplay\PHPToolKit\Tests\Unit\Api; use GuzzleHttp\Psr7\Request; +use GuzzleHttp\Psr7\Utils; use Prophecy\Argument; use SkillDisplay\PHPToolKit\Api\MemberSkills; use SkillDisplay\PHPToolKit\Configuration\Settings; @@ -53,7 +54,7 @@ class MemberSkillsTest extends TestCase }))->willReturn($response->reveal()); $response->getStatusCode()->willReturn(200); - $response->getBody()->willReturn('[{"uid": 1},{"uid": 2}]'); + $response->getBody()->willReturn(Utils::streamFor('[{"uid": 1},{"uid": 2}]')); $subject = new MemberSkills($settings->reveal(), $client->reveal()); $skills = $subject->getMemberSkillsById(10); diff --git a/tests/Unit/Api/OrganisationTest.php b/tests/Unit/Api/OrganisationTest.php index 3862dca..625aefc 100644 --- a/tests/Unit/Api/OrganisationTest.php +++ b/tests/Unit/Api/OrganisationTest.php @@ -5,6 +5,7 @@ declare(strict_types=1); namespace SkillDisplay\PHPToolKit\Tests\Unit\Api; use GuzzleHttp\Psr7\Request; +use GuzzleHttp\Psr7\Utils; use Prophecy\Argument; use SkillDisplay\PHPToolKit\Api\Organisation; use SkillDisplay\PHPToolKit\Api\SkillSet; @@ -54,7 +55,7 @@ class OrganisationTest extends TestCase }))->willReturn($response->reveal()); $response->getStatusCode()->willReturn(200); - $response->getBody()->willReturn('{"uid":10}'); + $response->getBody()->willReturn(Utils::streamFor('{"uid":10}')); $subject = new Organisation( $settings->reveal(),