src/Runner/Runner.php
private function runSuite(Suite $suite)
    {
        $this->runRunnable($suite->getHook('before'));
        $this->reporter->beforeSuite($suite);

        // Run the specs
        $this->runSpecs($suite);

        // Run nested suites
        foreach ($suite->getSuites() as $nestedSuite) {
            $this->runSuite($nestedSuite);
        }

        $this->reporter->afterSuite($suite);
        $this->runRunnable($suite->getHook('after'));
    }
private function runSuite(Suite $suite)
    {
        $this->runRunnable($suite->getHook('before'));
        $this->reporter->beforeSuite($suite);

        // Run the specs
        $this->runSpecs($suite);

        // Run nested suites
        foreach ($suite->getSuites() as $nestedSuite) {
            $this->runSuite($nestedSuite);
        }

        $this->reporter->afterSuite($suite);
        $this->runRunnable($suite->getHook('after'));
    }
private function runSuite ( Suite $ suite ) { $ this -> runRunnable ( $ suite -> getHook ( 'before' ) ) ; $ this -> reporter -> beforeSuite ( $ suite ) ; // Run the specs $ this -> runSpecs ( $ suite ) ; // Run nested suites foreach ( $ suite -> getSuites ( ) as $ nestedSuite ) { $ this -> runSuite ( $ nestedSuite ) ; } $ this -> reporter -> afterSuite ( $ suite ) ; $ this -> runRunnable ( $ suite -> getHook ( 'after' ) ) ; }
Runs a particular suite by running the associated hooks and reporter,
methods, iterating over its child suites and recursively calling itself,
followed by running its specs.

@param Suite $suite The suite to run
Runs a particular suite by running the associated hooks and reporter methods iterating over its child suites and recursively calling itself followed by running its specs .