Skip to content

Commit c86cf24

Browse files
author
Hasan
committed
Improve AbstractProviderTest to avoid php5.6 json_decode bug treating empty string as a valid json
1 parent 4867539 commit c86cf24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/src/Provider/AbstractProviderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,13 @@ public function testResponseParsingException()
630630
$this->provider->allowResponseParsingException();
631631
$exception = null;
632632
try {
633-
$this->testParseResponse('', '', null, 401);
633+
$this->testParseResponse('{13}', '', null, 401);
634634
} catch (ResponseParsingException $exception) {
635635
}
636636
$this->assertInstanceOf(ResponseParsingException::class, $exception);
637637
$response = $exception->getResponse();
638638
$this->assertSame(401, $response->getStatusCode());
639-
$this->assertSame('', $exception->getResponseBody());
639+
$this->assertSame('{13}', $exception->getResponseBody());
640640
$this->provider->disallowResponseParsingException();
641641
}
642642

0 commit comments

Comments
 (0)