function Prophet::checkPredictions
Checks all predictions defined by prophecies of this Prophet.
Return value
void
Throws
Exception\Prediction\AggregateException If any prediction fails
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Prophet.php, line 132
Class
- Prophet
- Prophet creates prophecies.
Namespace
ProphecyCode
public function checkPredictions() {
$exception = new AggregateException("Some predictions failed:\n");
foreach ($this->prophecies as $prophecy) {
try {
$prophecy->checkProphecyMethodsPredictions();
} catch (PredictionException $e) {
$exception->append($e);
}
}
if (count($exception->getExceptions())) {
throw $exception;
}
}