Skip to content

Commit 39ab714

Browse files
committed
Package updates
1 parent b7a2a1d commit 39ab714

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"php": "^7.2",
77
"ext-json": "*",
88
"ext-mbstring": "*",
9-
"guzzlehttp/guzzle": "^6.5",
10-
"guzzlehttp/psr7": "^1.6",
9+
"guzzlehttp/guzzle": "^6.5|^7.0",
10+
"guzzlehttp/psr7": "^1.5|^1.6",
1111
"psr/http-message": "^1.0",
1212
"psr/log": "^1.1",
13-
"jean85/pretty-package-versions": "^1.2"
13+
"jean85/pretty-package-versions": "^1.5"
1414
},
1515
"require-dev": {
1616
"phpunit/phpunit": "^8.5",

tests/Unit/Api/ExceptionTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@ public function testExceptionNoResponse()
2323
{
2424
$request = new Request('GET', 'https://cdn.contentful.com/spaces/cfexampleapi/entries');
2525

26-
$guzzleException = new ClientException('This is an error', $request);
26+
$response = new Response(
27+
401,
28+
['X-Contentful-Request-Id' => '426753a1639d40c23ad4cbf085a072c7'],
29+
'{"sys": {"type": "Error","id": "AccessTokenInvalid","requestId":"426753a1639d40c23ad4cbf085a072c7"}}',
30+
1.1,
31+
'Unauthorized'
32+
);
33+
34+
$guzzleException = new ClientException('This is an error', $request, $response);
2735
$exception = new Exception($guzzleException);
2836

2937
$this->assertSame('This is an error', $exception->getMessage());

0 commit comments

Comments
 (0)