src/Runners/PHPUnit/Runner.php
private function fillRunQueue()
    {
        $opts = $this->options;
        while (\count($this->pending) && \count($this->running) < $opts->processes) {
            $tokenData = $this->getNextAvailableToken();
            if ($tokenData !== false) {
                $this->acquireToken($tokenData['token']);
                $env = ['TEST_TOKEN' => $tokenData['token'], 'UNIQUE_TEST_TOKEN' => $tokenData['unique']] + Habitat::getAll();
                $this->running[$tokenData['token']] = array_shift($this->pending)->run($opts->phpunit, $opts->filtered, $env, $opts->passthru, $opts->passthruPhp);
                if ($opts->verbose) {
                    $cmd = $this->running[$tokenData['token']];
                    echo "\nExecuting test via: {$cmd->getLastCommand()}\n";
                }
            }
        }
    }
private function fillRunQueue()
    {
        $opts = $this->options;
        while (\count($this->pending) && \count($this->running) < $opts->processes) {
            $tokenData = $this->getNextAvailableToken();
            if ($tokenData !== false) {
                $this->acquireToken($tokenData['token']);
                $env = ['TEST_TOKEN' => $tokenData['token'], 'UNIQUE_TEST_TOKEN' => $tokenData['unique']] + Habitat::getAll();
                $this->running[$tokenData['token']] = array_shift($this->pending)->run($opts->phpunit, $opts->filtered, $env, $opts->passthru, $opts->passthruPhp);
                if ($opts->verbose) {
                    $cmd = $this->running[$tokenData['token']];
                    echo "\nExecuting test via: {$cmd->getLastCommand()}\n";
                }
            }
        }
    }
private function fillRunQueue ( ) { $ opts = $ this -> options ; while ( \ count ( $ this -> pending ) && \ count ( $ this -> running ) < $ opts -> processes ) { $ tokenData = $ this -> getNextAvailableToken ( ) ; if ( $ tokenData !== false ) { $ this -> acquireToken ( $ tokenData [ 'token' ] ) ; $ env = [ 'TEST_TOKEN' => $ tokenData [ 'token' ] , 'UNIQUE_TEST_TOKEN' => $ tokenData [ 'unique' ] ] + Habitat :: getAll ( ) ; $ this -> running [ $ tokenData [ 'token' ] ] = array_shift ( $ this -> pending ) -> run ( $ opts -> phpunit , $ opts -> filtered , $ env , $ opts -> passthru , $ opts -> passthruPhp ) ; if ( $ opts -> verbose ) { $ cmd = $ this -> running [ $ tokenData [ 'token' ] ] ; echo "\nExecuting test via: {$cmd->getLastCommand()}\n" ; } } } }
This method removes ExecutableTest objects from the pending collection
and adds them to the running collection. It is also in charge of recycling and
acquiring available test tokens for use.
This method removes ExecutableTest objects from the pending collection and adds them to the running collection . It is also in charge of recycling and acquiring available test tokens for use .