pho\Runner\Runner::runSpecs PHP Method

runSpecs() private method

Runs the specs associated with the provided test suite. It iterates over and runs each spec, calling the reporter's beforeSpec and afterSpec methods, as well as the suite's beforeEach and aferEach hooks. If the filter option is used, only specs containing a pattern are ran. And if the stop flag is used, it quits when an exception or error is thrown.
private runSpecs ( pho\Suite\Suite $suite )
$suite pho\Suite\Suite The suite containing the specs to run
    private function runSpecs(Suite $suite)
    {
        foreach ($suite->getSpecs() as $spec) {
            // If using the filter option, only run matching specs
            $pattern = self::$console->options['filter'];
            if ($pattern && !preg_match($pattern, $spec)) {
                continue;
            }
            $this->runBeforeEachHooks($suite);
            $this->reporter->beforeSpec($spec);
            $this->runRunnable($spec);
            $this->reporter->afterSpec($spec);
            $this->runAfterEachHooks($suite);
            if ($spec->exception) {
                self::$console->setExitStatus(1);
                if (self::$console->options['stop']) {
                    $this->reporter->afterRun();
                    exit(1);
                }
            }
        }
    }