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

[REST] seeResponseIsJson must fail when response is empty #3401

Merged
merged 2 commits into from Aug 4, 2016

Conversation

Projects
None yet
2 participants
@Naktibalda
Member

Naktibalda commented Aug 3, 2016

This change makes behaviour of this method on PHP5 consistent with PHP7
Closes #3400

Naktibalda added some commits Aug 3, 2016

[REST] seeResponseIsJson must fail when response is empty
This change makes behaviour of this method on PHP5 consistent with PHP7
Closes #3400
Comparison message should not override assertion message
Before:
 Test  tests/unit/Codeception/Module/RestTest.php:testSeeResponseIsJsonFailsWhenResponseIsInvalidJson
Failed asserting that 4 matches expected 0.

After:
 Test  tests/unit/Codeception/Module/RestTest.php:testSeeResponseIsJsonFailsWhenResponseIsInvalidJson
Invalid json: {. System message: Syntax error.
Failed asserting that 4 matches expected 0.
@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Aug 4, 2016

Member

May look like breaking change but pretty minor one.

Member

DavertMik commented Aug 4, 2016

May look like breaking change but pretty minor one.

@Naktibalda

This comment has been minimized.

Show comment
Hide comment
@Naktibalda

Naktibalda Aug 4, 2016

Member

It could be considered as a bugfix, right?
Empty response is not really a valid json.

Member

Naktibalda commented Aug 4, 2016

It could be considered as a bugfix, right?
Empty response is not really a valid json.

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Aug 4, 2016

Member

Right.

Member

DavertMik commented Aug 4, 2016

Right.

@DavertMik DavertMik merged commit 9d3e03f into Codeception:2.2 Aug 4, 2016

3 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

@Naktibalda Naktibalda deleted the Naktibalda:2.2-rest-empty-json branch Aug 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment