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
18 changes: 9 additions & 9 deletions src/Codeception/Module/REST.php
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,10 @@ public function seeResponseContainsJson(array $json = []): void
*
* // response {"name": "john", "age": 20}
* $schema = [
* "properties" => [
* "age" => [
* "type" => "integer",
* "minimum" => 18
* 'properties' => [
* 'age' => [
* 'type' => 'integer',
* 'minimum' => 18
* ]
* ]
* ];
Expand Down Expand Up @@ -1578,7 +1578,7 @@ public function dontSeeXmlResponseEquals($xml): void
*
* ``` php
* <?php
* $I->seeXmlResponseIncludes("<result>1</result>");
* $I->seeXmlResponseIncludes('<result>1</result>');
* ```
*
* @param mixed $xml
Expand Down Expand Up @@ -1619,22 +1619,22 @@ public function dontSeeXmlResponseIncludes($xml): void
*
* ```php
* <?php
* $I->seeBinaryResponseEquals("df589122eac0f6a7bd8795436e692e3675cadc3b");
* $I->seeBinaryResponseEquals('df589122eac0f6a7bd8795436e692e3675cadc3b');
* ```
*
* Example: Using sha1 for a file contents
*
* ```php
* <?php
* $fileData = file_get_contents("test_file.jpg");
* $fileData = file_get_contents('test_file.jpg');
* $I->seeBinaryResponseEquals(md5($fileData));
* ```
* Example: Using sha256 hash
*
* ```php
* <?php
* $fileData = '/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k='; // very small jpeg
* $I->seeBinaryResponseEquals(hash("sha256", base64_decode($fileData)), 'sha256');
* $I->seeBinaryResponseEquals(hash('sha256', base64_decode($fileData)), 'sha256');
* ```
*
* @param string $hash the hashed data response expected
Expand All @@ -1653,7 +1653,7 @@ public function seeBinaryResponseEquals(string $hash, string $algo = 'sha1'): vo
*
* ```php
* <?php
* $I->dontSeeBinaryResponseEquals("8c90748342f19b195b9c6b4eff742ded");
* $I->dontSeeBinaryResponseEquals('8c90748342f19b195b9c6b4eff742ded');
* ```
* Opposite to `seeBinaryResponseEquals`
*
Expand Down