From 034e45fa6e9c53ed2a0f8e327e5e0c5174dee220 Mon Sep 17 00:00:00 2001 From: kiban Date: Tue, 29 Mar 2022 12:44:37 +0300 Subject: [PATCH 1/3] Don't pass null to isBinaryData --- src/Codeception/Module/REST.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Codeception/Module/REST.php b/src/Codeception/Module/REST.php index c7105fe..2e8d934 100644 --- a/src/Codeception/Module/REST.php +++ b/src/Codeception/Module/REST.php @@ -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; } @@ -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); } @@ -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(); From b01ebf7daa40dcceec9f37e884abafad55ec3922 Mon Sep 17 00:00:00 2001 From: Gintautas Miselis Date: Thu, 11 Aug 2022 15:49:52 +0300 Subject: [PATCH 2/3] Set COMPOSER_ROOT_VERSION in Github Actions --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2015c21..d76c53d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,9 @@ jobs: tests: runs-on: ubuntu-latest + env: + COMPOSER_ROOT_VERSION: 2.99.99 + strategy: matrix: php: [7.4, 8.0] From 89db1fabb62c4608455283b2992e9d0ff6024e84 Mon Sep 17 00:00:00 2001 From: Gintautas Miselis Date: Fri, 10 Mar 2023 21:21:08 +0200 Subject: [PATCH 3/3] Support softcreatr/jsonpath 0.8 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ae682ed..11a0c19 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "ext-json": "*", "codeception/codeception": "^4.1", "justinrainbow/json-schema": "~5.2.9", - "softcreatr/jsonpath": "^0.5 | ^0.7" + "softcreatr/jsonpath": "^0.5 | ^0.7 | ^0.8" }, "require-dev": { "codeception/stub": "^4.0",