Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Codeception/Module/REST.php
Original file line numberDiff line numberDiff line change
Expand Up@@ -180,7 +180,7 @@ public function _inject(InnerBrowser $connection)

public function _failed(TestInterface $test, $fail)
{
if ($this->response === '' || $this->response === '0'){
if ($this->response === null || $this->response === '' || $this->response === '0'){
return;
}

Expand DownExpand Up@@ -706,7 +706,7 @@ protected function execute($method, $url, $parameters = [], $files = [])
}

$printedResponse = $this->response;
if ($this->isBinaryData((string)$printedResponse)){
if ($this->isBinaryData((string)$printedResponse)){
$printedResponse = $this->binaryToDebugString($printedResponse);
}

Expand DownExpand Up@@ -1000,7 +1000,7 @@ public function seeResponseIsValidOnJsonSchema(string $schemaFilename): void
* @param string $jsonString the json encoded string
* @param string $errorFormat optional string for custom sprintf format
*/
protected function decodeAndValidateJson(string $jsonString, string $errorFormat="Invalid json: %s. System message: %s.")
protected function decodeAndValidateJson(string $jsonString, string $errorFormat = "Invalid json: %s. System message: %s.")
{
$json = json_decode($jsonString);
$errorCode = json_last_error();
Expand Down