This release is minor, yet fixes lots of bugs you might have encountered. If you didn’t encounter them, well, then, lucky you. Still it’s a good idea to upgrade.
Here is the list of changes.
- fix to 80 port issue, if you had problems connecting to server via PhpBrowser, then this must be it. Thanks to @tiger-seo.
- fix in REST module when using
application/json
header and passing parameters. - seeJsonResponseContains of REST can now search on all nesting levels. Details below.
- fix to Sequence module.
- Step class code improved by guilhermeFranco
- Using suite with defined namespace was improved by @Borales.
- Generators fixes by @piccagliani and davert.
Rest Module Changes Example
added on 09/15/2013
seeJsonResponseContains
behavior is less strict now. Now you it checks for any inclusion of provided json in Response, and works for unordered arrays as well. Here is an example.
In previous versions, only the first assertion would pass. But now seeJsonResponseContains
will scan for inclusion on all levels of response json.
There was no other way to get it tested unordered arrays. Until 1.6.7. Here is a sample response:
And test part that was failing in previous versions:
Example taken from #330
The case here, if you didn’t know the index of element, you couldn’t verify it with seeJsonResponseContains
.
If you were using indexes, tests still should work for you.
Another change is checks for null
values in response. Actually, we deserialized them in empty strings ""
, and this was a regular workaround to replace null
with ""
in tests as proposed in #381. But if you did that, you should update your tests for 1.6.7, as null
work as expected now.
So this is the changes that might affect your tests. If you got issues. seeJsonResponseContains
has much more detailed output on fails, so it would be easier to find the cause and get it fixed.
Update
redownload your codeception.phar
for update:
for composer version