Given a multidimensional array, I try to run somearray->shouldHaveKey('somekey') but it only searches at the first dimension and not down through the multidimensional array
In php you can just insert the array with the specific path to an isset check:
isset($a['some']['not']['existing']);
I don't know phpspec, but i think there must be something like isTrue()
, so you could check the Response of isset.
I think you must create an inline matcher as described in PHPSpec guide