New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binary output checks for REST module #3993

Merged
merged 2 commits into from Feb 4, 2017

Conversation

Projects
None yet
2 participants
@spikyjt
Contributor

spikyjt commented Feb 4, 2017

closes #3992

@spikyjt spikyjt changed the title from binary output checks for REST module #3992 to binary output checks for REST module Feb 4, 2017

@DavertMik

Thanks, looks really awesome, but one thing:

@@ -1219,6 +1219,34 @@ public function dontSeeXmlResponseIncludes($xml)
}
/**
* Checks if the hash of a binary response is exactly the same as provided.

This comment has been minimized.

@DavertMik

DavertMik Feb 4, 2017

Member

a code example would be very helpful here. You can take one from your tests and add here.

@DavertMik

DavertMik Feb 4, 2017

Member

a code example would be very helpful here. You can take one from your tests and add here.

This comment has been minimized.

@spikyjt

spikyjt Feb 4, 2017

Contributor

done (3 of them!)

@spikyjt

spikyjt Feb 4, 2017

Contributor

done (3 of them!)

@DavertMik

One more thing...

* ```php
* <?php
* $fileData = '/9j/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/yQALCAABAAEBAREA/8wABgAQEAX/2gAIAQEAAD8A0s8g/9k='; // very small jpeg
* $I->seeBinaryResponseEquals(hash("sha256", base64_decode($fileData)));

This comment has been minimized.

@DavertMik

DavertMik Feb 4, 2017

Member

yep, but use sha256 but the method still uses md5!

@DavertMik

DavertMik Feb 4, 2017

Member

yep, but use sha256 but the method still uses md5!

/**
* Checks if the hash of a binary response is not the same as provided.
*

This comment has been minimized.

@DavertMik

DavertMik Feb 4, 2017

Member

and one example here, please :)

@DavertMik

DavertMik Feb 4, 2017

Member

and one example here, please :)

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Feb 4, 2017

Member

Please fix the example and I'm merging.

Member

DavertMik commented Feb 4, 2017

Please fix the example and I'm merging.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Feb 4, 2017

Member

Ok, I will update that by myself. Thanks

Member

DavertMik commented Feb 4, 2017

Ok, I will update that by myself. Thanks

@DavertMik DavertMik merged commit 78e66a6 into Codeception:2.2 Feb 4, 2017

4 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details
wercker/build Wercker pipeline passed
Details

chris1312 added a commit to chris1312/Codeception that referenced this pull request Jun 16, 2017

binary output checks for REST module (#3993)
* binary output checks for REST module #3992

* examples for binary response checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment