src/Runner/Runner.php
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->reporter->beforeSpec($spec);

            $this->runBeforeEachHooks($suite, $spec);
            $this->runRunnable($spec);
            $this->runAfterEachHooks($suite, $spec);

            $this->reporter->afterSpec($spec);
        }
    }
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->reporter->beforeSpec($spec);

            $this->runBeforeEachHooks($suite, $spec);
            $this->runRunnable($spec);
            $this->runAfterEachHooks($suite, $spec);

            $this->reporter->afterSpec($spec);
        }
    }
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 -> reporter -> beforeSpec ( $ spec ) ; $ this -> runBeforeEachHooks ( $ suite , $ spec ) ; $ this -> runRunnable ( $ spec ) ; $ this -> runAfterEachHooks ( $ suite , $ spec ) ; $ this -> reporter -> afterSpec ( $ spec ) ; } }
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.

@param Suite $suite The suite containing the specs to run
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 .