protected function configure() { $this->setName('lint'); $this->setDescription('Runs the linter over a given directory'); $this->addArgument('files', InputArgument::IS_ARRAY, 'Directory or list of files to scan'); $this->addOption('workers', 'w', InputOption::VALUE_REQUIRED, "The number of concurrent workers to run", System::cpuCount() + 1); $this->addOption('tap', null, InputOption::VALUE_NONE, "Output in TAP format"); $this->addOption('exclude', null, InputOption::VALUE_REQUIRED, "Do not attempt to check file names that match this regex."); $this->addOption('autoFix', 'a', InputOption::VALUE_NONE, 'Automatically fix common problems.'); $this->addOption('junitXml', 'x', InputOption::VALUE_REQUIRED, 'Output junit xml to the file provided.'); $this->addOption('checkstyleXml', 'X', InputOption::VALUE_REQUIRED, 'Output checkstyle xml to the file provided.'); $this->addOption('pmdXml', null, InputOption::VALUE_NONE, 'Output PMD/PHPMD xml to stdout.'); $this->addOption('config', 'c', InputOption::VALUE_OPTIONAL, "The config file to generate/update", 'bugfree.json'); $this->addOption('ini_set', 'd', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, "Ini settings to pass through to the worker"); }
public function configure() { $this->setName('phpunit-parallel'); $this->addOption('configuration', 'c', InputOption::VALUE_REQUIRED, 'Read configuration from XML file.'); $this->addOption('formatter', 'F', InputOption::VALUE_REQUIRED, 'The formatter to use (xunit,tap,lane,noiseless)', 'lane'); $this->addOption('worker', 'w', InputOption::VALUE_NONE, 'Run as a worker, accepting a list of test files to run'); $this->addArgument('filenames', InputArgument::IS_ARRAY, 'zero or more test filenames to run', []); $this->addOption('workers', 'C', InputOption::VALUE_REQUIRED, 'Number of workers to spawn', System::cpuCount() + 1); $this->addOption('write', 'W', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Takes a pair of format:filename, where format is one of the --formatter arguments'); $this->addOption('stop-on-error', null, InputOption::VALUE_NONE, 'Stop if an error is encountered on any worker'); $this->addOption('replay', null, InputOption::VALUE_REQUIRED, 'filename:WorkerX - Replay from a result.json file the tests that ran on a single worker.'); $this->addOption('interpreter-options', null, InputOption::VALUE_REQUIRED, 'Options to be passed through to the workers php interpreter'); $this->addOption('memory-tracking', null, InputOption::VALUE_REQUIRED, 'Enable per-test tracking of memory usage', $this->isMemoryTrackingSafe()); $this->addOption('bootstrap', null, InputOption::VALUE_REQUIRED, 'Set the bootstrap to include before running tests.'); }