$this->assertArrayHasKey(['name', 'email'], $array);
$this->assertObjectHasAttribute(['name', 'email'], $object);
This looks very basic to me.
I don't know why they were not implemented this way.
I taught of opening an issue first, maybe I'm missing something.
If not I'll go ahead and submit a PR.
I came here just to open this issue! Can this be done please?
I do not think that this makes sense, sorry.
@sebastianbergmann Can you suggest a clean way to test that multiple keys exist in the result? If you are looking for a single key, you can do it in one line. If you are looking for two keys, you need three lines, one to store the result, and two to check the keys.
Most helpful comment
@sebastianbergmann Can you suggest a clean way to test that multiple keys exist in the result? If you are looking for a single key, you can do it in one line. If you are looking for two keys, you need three lines, one to store the result, and two to check the keys.