Kraken\Test\Simulation\Simulation::start PHP Метод

start() приватный Метод

private start ( )
    private function start()
    {
        $sim = $this;
        $scenario = $this->scenario;
        $scenario($sim);
        if ($this->stopFlags === true) {
            return;
        }
        $onStart = $this->startCallback;
        $loop = $this->loop;
        $loop->onStart(function () use($sim, $onStart) {
            $onStart($sim);
        });
        $loop->addTimer(5, function () use($sim) {
            $sim->fail('Timeout for test has been reached.');
        });
        $loop->start();
        if ($sim->failureMessage !== null) {
            throw new Exception($sim->failureMessage);
        }
    }