function NoCallsPrediction::check
Overrides PredictionInterface::check
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Prediction/ NoCallsPrediction.php, line 34
Class
- NoCallsPrediction
- Tests that there were no calls made.
Namespace
Prophecy\PredictionCode
public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) {
if (!count($calls)) {
return;
}
$verb = count($calls) === 1 ? 'was' : 'were';
throw new UnexpectedCallsException(sprintf("No calls expected that match:\n" . " %s->%s(%s)\n" . "but %d %s made:\n%s", get_class($object->reveal()), $method->getMethodName(), $method->getArgumentsWildcard(), count($calls), $verb, $this->util
->stringifyCalls($calls)), $method, $calls);
}