public function checkPredictions()
    {
        $exception = new AggregateException("Some predictions failed:\n");
        foreach ($this->prophecies as $prophecy) {
            try {
                $prophecy->checkPredictions();
            } catch (PredictionException $e) {
                $exception->append($e);
            }
        }

        $this->prophecies = [];
        MockRegistry::getInstance()->unregisterAll();

        if (count($exception->getExceptions())) {
            throw $exception;
        }

    }
public function checkPredictions()
    {
        $exception = new AggregateException("Some predictions failed:\n");
        foreach ($this->prophecies as $prophecy) {
            try {
                $prophecy->checkPredictions();
            } catch (PredictionException $e) {
                $exception->append($e);
            }
        }

        $this->prophecies = [];
        MockRegistry::getInstance()->unregisterAll();

        if (count($exception->getExceptions())) {
            throw $exception;
        }

    }
public function checkPredictions ( ) { $ exception = new AggregateException ( "Some predictions failed:\n" ) ; foreach ( $ this -> prophecies as $ prophecy ) { try { $ prophecy -> checkPredictions ( ) ; } catch ( PredictionException $ e ) { $ exception -> append ( $ e ) ; } } $ this -> prophecies = [ ] ; MockRegistry :: getInstance ( ) -> unregisterAll ( ) ; if ( count ( $ exception -> getExceptions ( ) ) ) { throw $ exception ; } }
Check all prophecies for predictions

@throws AggregateException
Check all prophecies for predictions