Find and run the tests

@param array $arguments
@return bool
349880
public function run(array $arguments): bool
    {
        $exception = null;
        try {
            $this->prepareConfigurationProvider($arguments);
            $this->prepareCustomBootstrapAndAutoloading($this->configurationProvider->get('bootstrap'));
            $this->printer->setVerbose($this->configurationProvider->get('verbose'));
            $this->exceptionPrinter->setVerbose($this->configurationProvider->get('verbose'));

            switch ($this->configurationProvider->get('command')) {
                case 'list':
                    $commandClass = ListCommand::class;
                    break;

                case 'run':
                default:
                    $commandClass = RunCommand::class;
                    break;
            }

            /** @var CommandInterface $command */
            $command = $this->objectManager->get(
                $commandClass,
                $this->configurationProvider,
                $this->objectManager,
                $this->classLoader,
                $this->printer,
                $this->exceptionPrinter
            );
            $result = $command->run();

            $this->printFooter();

            return $result;
        } catch (ConfigurationException $exception) {
        } catch (FileNotExistsException $exception) {
        }

        $this->error($exception->getMessage());

        return false;
    }
785754
public function invokeWith($arguments = [])
    {
        if (!$arguments instanceof Arguments) {
            $arguments = new Arguments($arguments);
        }

        return $this->invoker->callWith($this->customCallback, $arguments);
    }
1052678
public function checkCalledWith(...$arguments): ?EventCollection
    {
        $cardinality = $this->resetCardinality()->assertSingular();
        $matchers = $this->matcherFactory->adaptAll($arguments);

        list($matchCount, $matchingEvents) = $this->matchIf(
            $this->call,
            $this->matcherVerifier
                ->matches($matchers, $this->call->arguments()->all())
        );

        if ($cardinality->matches($matchCount, 1)) {
            return $this->assertionRecorder->createSuccess($matchingEvents);
        }

        return null;
    }
68740
public function is($condition, $arguments = [])
    {
        if (is_array($arguments)) {
            return call_user_func_array($this->{$condition}, $arguments);
        }

        return call_user_func($this->{$condition}, $arguments);
    }
471879
public function run(array $args)
    {
        $command = (string)$args[1];
        $this->router->match($command);
        $args = array_slice($args, 2);

        return $this->router->executeCommand($args);
    }
3679
public function run(array $args) {
		foreach($this->calls as $call) {
			if($call instanceof \SuperClosure\SerializableClosure)
				$call = $call->getClosure();
			$res = call_user_func_array($call, array_merge([$this], $args));
			$this->executed++;
			if($res !== null)
				return $res;
			if(!$this->continue)
				return;
		}
	}
117307
public function evaluate($method, $arguments)
    {
        $this->validate($method, $arguments);
        return $this->evaluator->evaluate($method, $arguments);
    }
1286956
public function executeOne($arguments = array())
    {
        $result = $this->execute($arguments);
        if (is_array($result) && count($result) > 0) {
            $result = $result[0];
        }
        return $result;
    }
657278
public function run(array $args = null)
    {
        global $argv;

        if (isset($argv[1]) && $argv[1] == 'autocomplete' && !isset($argv[2])) {
            $this->setBanner(
                function () {
                    return 0;
                }
            );
            $this->setFooter(
                function () {
                    return 0;
                }
            );
        }

        return parent::run($args);
    }
309506
private function cmdCheck($args)
    {
        $cmd = new CheckCommand($this->cwd);

        return $cmd->run(array_slice($args, 1));
    }
1213460
public function run($args)
    {
        $args = $this->parseArgs($args);
        foreach ($this->options as $argument => $attribute) {
            $this->{$attribute} = in_array($argument, $args);
            if ($this->{$attribute}) {
                $args = array_values(array_diff($args, [$argument]));
            }
        }

        if (!isset($args[0]) || !$args[0]) {
            return $this->initPath($this->cwd);
        }

        $projectName = $args[0];
        if (!$this->existsProjectName($projectName)) {
            return "> Producer: Project '{$this->projectsDir}/{$projectName}' not found.\n";
        }

        return $this->initPath($this->getProjectDir($projectName));
    }
861335
protected function execute(array $arguments)
    {
        \array_unshift($arguments, $this->path);
        
        $builder = ProcessBuilder::create($arguments);
        $process = $builder->getProcess();
        $process->run();
        
        if (!$process->isSuccessful()) {
            throw CommandException::factory($process);
        }
        
        // E.g. tesseract --version returns output as error output
        return $process->getOutput() ? $process->getOutput() : $process->getErrorOutput();
    }
36812
protected function arguments(array $arguments = null)
    {
        return is_null($arguments)
            ? $this->arguments
            : ($this->arguments = $arguments);
    }
748645
protected function validateMissingArguments(array $arguments): bool
    {
        $missingArguments = \array_filter($arguments, function ($argument) {
            return empty($this->argument($argument));
        });

        if (\count($missingArguments) > 1) {
            throw new RuntimeException(\sprintf('Not enough arguments (missing: "%s").', \implode(', ', $missingArguments)));
        }

        return true;
    }
365672
public function run(array $args = null) {
		$exec = escapeshellcmd($this->command);
		if ($args) {
			$exec .= " ". implode(" ", array_map("escapeshellarg", (array) $args));
		}
		
		if ($this->sudo) {
			$this->suExec(sprintf($this->sudo." 2>&1", $exec), $this->verbose);
		} elseif ($this->verbose) {
			ob_start(function($s) {
				$this->output .= $s;
				return $s;
			}, 1);
			passthru($exec, $this->status);
			ob_end_flush();
		} elseif ($this->verbose !== false /* !quiet */) {
			ob_start([$this, "progress"], 1);
			passthru($exec . " 2>&1", $this->status);
			ob_end_flush();
		} else {
			exec($exec ." 2>&1", $output, $this->status);
			$this->output = implode("\n", $output);
		}
		
		if ($this->status) {
			throw new Exception("Command {$exec} failed ({$this->status})");
		}

		return $this;
	}
1220532
public function check($controller, array $arguments = [])
    {
        if ($this->controller !== $controller) {
            return false;
        }

        foreach ($this->requirements as $key => $regex) {
            $value = isset($arguments[$key]) ? $arguments[$key] : null;

            if (!preg_match('/^' . $regex . '$/i', $value)) {
                return false;
            }
        }

        return true;
    }
1016309
protected function checkRetry($method, $arguments = array())
    {
        Tools::log("Run {$method} Faild. {$this->errMsg}[{$this->errCode}]", "ERR - {$this->appid}");
        if (!$this->_retry && in_array($this->errCode, array('40014', '40001', '41001', '42001'))) {
            ($this->_retry = true) && $this->resetAuth();
            $this->errCode = 40001;
            $this->errMsg = 'no access';
            Tools::log("Retry Run {$method} ...", "MSG - {$this->appid}");
            return call_user_func_array(array($this, $method), $arguments);
        }
        return false;
    }