oscarotero / psr7-middlewares

[DEPRECATED] Collection of PSR-7 middlewares

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Defective unit tests not marked as risky.

sander-bol opened this issue · comments

@abacaphiliac While working on changes to Payload for #50 I took a closer look at the unit tests for Payload. It seems that something is going wrong there.

The callback defined in testJsonObjectPayload is never actually triggered, thus never hitting the asserts defined in there. Reason is that the Transformer throws a DomainException("Syntax Error"). Which, if you look at the JSON closely is correct: {"buz",true}} should be {"buz":true}}. Took quite some time to figure this one out :)

The bigger problem, and the reason I'm making this an issue instead of fixing it in a PR directly, is that we apparently run unit tests which trigger no assertions at all, and are still considered valid. I'd like to propose adding beStrictAboutTestsThatDoNotTestAnything="true" to the phpunit.xml configuration to deal with this.

Fixed in #55.