While unit testing in PHPUnit, I'm in a situation where I need to check if an array contains al least one object of a specific type.
Obviously I can do that with custom code, but is there any assertion (or combination of them) which allows me to do that?
I need to do that many times in multiple tests so, if the assertion I need doesn't esist, how do I extend the set of PHPUnit assertions?
Thank you
Aucun commentaire:
Enregistrer un commentaire