Closed
Description
The assertObjectHasAttribute() is deprecated because the word "attribute" means something different in the PHP world now. But it was deprecated without any replacement, stating that it is bad code causing this assertion, one should use classes etc instead.
The problem is that I am using PhpUnit to unit-test my JSON API, and I cannot see a replacement for just checking the JSON structure. Of course, assertTrue(property_exists())
works, but the error message yielded is not nearly as good as assertObjectHasAttribute was.
Can we consider making assertObjectHasProperty()? That name will never be wrong, because it is the exact same word as in property_exists().