public function checkPredictions()
    {
        $exception = new AggregateException(sprintf("%s:\n", $this->name));

        foreach ($this->prophecies as $prophecy) {
            try {
                $prophecy->checkPrediction();
            } catch (PredictionException $e) {
                $exception->append($e);
            }
        }

        if (count($exception->getExceptions())) {
            throw $exception;
        }
    }
public function checkPredictions()
    {
        $exception = new AggregateException(sprintf("%s:\n", $this->name));

        foreach ($this->prophecies as $prophecy) {
            try {
                $prophecy->checkPrediction();
            } catch (PredictionException $e) {
                $exception->append($e);
            }
        }

        if (count($exception->getExceptions())) {
            throw $exception;
        }
    }
public function checkPredictions ( ) { $ exception = new AggregateException ( sprintf ( "%s:\n" , $ this -> name ) ) ; foreach ( $ this -> prophecies as $ prophecy ) { try { $ prophecy -> checkPrediction ( ) ; } catch ( PredictionException $ e ) { $ exception -> append ( $ e ) ; } } if ( count ( $ exception -> getExceptions ( ) ) ) { throw $ exception ; } }
Checks that registered method predictions do not fail.

@throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail
Checks that registered method predictions do not fail .