PhpBench\Benchmarks\Macro\BaseBenchCase::runCommand PHP Метод

runCommand() публичный Метод

public runCommand ( $serviceId, $args )
    public function runCommand($serviceId, $args)
    {
        chdir(Workspace::getWorkspacePath());
        $input = new ArrayInput($args);
        $output = new BufferedOutput();
        $command = $this->getContainer()->get($serviceId);
        $exitCode = $command->run($input, $output);
        if ($exitCode !== 0) {
            throw new \RuntimeException(sprintf('Got non-zero exit code when executing command "%s"', $serviceId));
        }
        return $output;
    }