You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, let me thank you for your library. I find it really useful in testing JSON APIs. However, I think I faced a problem that I'm not sure how to work around.
Now I want to test that the first item does not have a bookshelf element. In fact, in json it simply means null. But testing on null (as well as on empty) fails. What I tried:
First of all, let me thank you for your library. I find it really useful in testing JSON APIs. However, I think I faced a problem that I'm not sure how to work around.
So, we have this json:
Now I want to test that the first item does not have a bookshelf element. In fact, in json it simply means
null
. But testing on null (as well as on empty) fails. What I tried:self::assertJsonValueEquals($content, '$["hydra:member"][0]["bookshelf"]', null);
self::assertJsonValueMatches($content, '$["hydra:member"][0]["bookshelf"]', PHPUnit\Framework\Assert::isEmpty());
self::assertJsonValueMatches($content, '$["hydra:member"][0]["bookshelf"]', PHPUnit\Framework\Assert::isNull());
But any of those unfortunately fail to match. Is there a way to do that? Thanks!
The text was updated successfully, but these errors were encountered: