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
For example if we expecting JSON collection, but server response contains hash object, they will be equal.
For example we expecting:
['Foo','Bar']
And server response was
{"0": "Foo","1": "Bar"}
This is caused by ignoring typo of JSON object. When you use json_decode($json, false); it will return array for expecting value and stdObject for actual value. But assertion uses json_decode($json, true);, so both expected and actual values will be converted to simple array with integer keys and they will be equal.
The text was updated successfully, but these errors were encountered:
For example if we expecting JSON collection, but server response contains hash object, they will be equal.
For example we expecting:
And server response was
This is caused by ignoring typo of JSON object. When you use
json_decode($json, false);
it will return array for expecting value and stdObject for actual value. But assertion usesjson_decode($json, true);
, so both expected and actual values will be converted to simple array with integer keys and they will be equal.The text was updated successfully, but these errors were encountered: