Closed carusogabriel closed 6 years ago
For what I see, assertInstanceOf()
fails if the actual argument is a string. From the name of the method I would exactly expect that as a string is not an instance. Changing the behavior to the one of is_a('stdClass', 'stdClass', true)
would thus be not a good idea, in my opinion.
The IsInstanceOf
constraint is -- and is supposed to be -- "just" a wrapper for the instanceof
operator.
Hi,
While refactoring some tests (https://github.com/zendframework/zend-expressive/pull/590), we've discovered that the second argument of
assertInstanceOf
does not check if the given value is actually anobject
. Should we check it, or maybe extend theassertInstanceOf
functionality to also accept astring
and instantiate it if is anobject
?