function it_does_not_matches_wrong_class($object) { $this->shouldThrow(new FailureException('Expected an instance of stdClass, but got object.'))->duringPositiveMatch('haveType', $object, array('stdClass')); }