src/Runner/Runner.php
public function describe($title, \Closure $closure)
    {
        $previous = $this->current;
        $suite = new Suite($title, $closure, $previous);

        if ($this->current === $this->root) {
            $this->suites[] = $suite;
        } else {
            $this->current->addSuite($suite);
        }

        $this->current = $suite;
        $suite->getClosure()->__invoke();
        $this->current = $previous;
    }
public function describe($title, \Closure $closure)
    {
        $previous = $this->current;
        $suite = new Suite($title, $closure, $previous);

        if ($this->current === $this->root) {
            $this->suites[] = $suite;
        } else {
            $this->current->addSuite($suite);
        }

        $this->current = $suite;
        $suite->getClosure()->__invoke();
        $this->current = $previous;
    }
public function describe ( $ title , \ Closure $ closure ) { $ previous = $ this -> current ; $ suite = new Suite ( $ title , $ closure , $ previous ) ; if ( $ this -> current === $ this -> root ) { $ this -> suites [ ] = $ suite ; } else { $ this -> current -> addSuite ( $ suite ) ; } $ this -> current = $ suite ; $ suite -> getClosure ( ) -> __invoke ( ) ; $ this -> current = $ previous ; }
Constructs a test Suite, assigning it the given title and anonymous
function. If it's a child of another suite, a reference to the parent
suite is stored. This is done by tracking the current and previously
defined suites.

@param string   $title   A title to be associated with the suite
@param \Closure $closure The closure to invoke when the suite is ran
Constructs a test Suite assigning it the given title and anonymous function . If it s a child of another suite a reference to the parent suite is stored . This is done by tracking the current and previously defined suites .