Exemplo n.º 1
0
 protected function configure()
 {
     parent::configure();
     $this->setName('list');
     $this->setDescription('Lists commands.');
     $this->setHelp('The <info>list</info> command lists all commands:' . PHP_EOL . PHP_EOL . '  <info>testrunner list</info>');
 }
Exemplo n.º 2
0
 protected function configure()
 {
     parent::configure();
     $this->setName('compile');
     $this->setDescription('Compiles the DIC for the production environment.');
     $this->setHelp('The <info>compile</info> command compiles the dependency injection container for the production environment:' . PHP_EOL . PHP_EOL . '  <info>testrunner ' . $this->getName() . '</info>');
 }
Exemplo n.º 3
0
 protected function configure()
 {
     parent::configure();
     $this->setName(strtolower($this->getPlugin()->getPluginID()));
     $this->setDescription('Runs tests with ' . $this->getPlugin()->getPluginID() . '.');
     $this->setHelp('The <info>' . $this->getName() . '</info> command runs tests with ' . $this->getPlugin()->getPluginID() . ':' . PHP_EOL . PHP_EOL . '  <info>testrunner ' . $this->getName() . ' ...</info>');
     $this->addArgument('test_directory_or_file', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'The directory or file that contains tests to be run <comment>(default: The working directory at testrunner startup)</comment>');
     $this->addOption('config', 'c', InputOption::VALUE_REQUIRED, 'The YAML-based configuration file for Stagehand_TestRunner');
     $this->addOption('recursive', 'R', InputOption::VALUE_NONE, 'Recursively runs tests in the specified directories.');
     if ($this->getPlugin()->hasFeature('autotest')) {
         $this->addOption('autotest', 'a', InputOption::VALUE_NONE, 'Monitors for changes in the specified directories and run tests when changes are detected.');
         $this->addOption('watch-dir', 'w', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'The directory to be monitored for changes <comment>(default: The directories specified by the arguments)</comment>');
     }
     if ($this->getPlugin()->hasFeature('notify')) {
         $this->addOption('notify', 'm', InputOption::VALUE_NONE, 'Notifies test results by using the growlnotify command in Mac OS X and Windows or the notify-send command in Linux.');
     }
     if ($this->getPlugin()->hasFeature('detailed_progress')) {
         $this->addOption('detailed-progress', 'd', InputOption::VALUE_NONE, 'Prints detailed progress report.');
     }
     if ($this->getPlugin()->hasFeature('stop_on_failure')) {
         $this->addOption('stop-on-failure', 's', InputOption::VALUE_NONE, 'Stops the test run when the first failure or error is raised.');
     }
     if ($this->getPlugin()->hasFeature('junit_xml')) {
         $this->addOption('log-junit', null, InputOption::VALUE_REQUIRED, 'Logs test results into the specified file in the JUnit XML format.');
         $this->addOption('log-junit-realtime', null, InputOption::VALUE_NONE, 'Logs test results in real-time into the specified file in the JUnit XML format.');
     }
     $this->addOption('test-file-pattern', null, InputOption::VALUE_REQUIRED, 'The regular expression pattern for test files <comment>(default: ' . $this->getPlugin()->getTestFilePattern() . ')</comment>');
     if ($this->getPlugin()->hasFeature('test_methods')) {
         $this->addOption('test-method', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'The test method to be run');
     }
     if ($this->getPlugin()->hasFeature('test_classes')) {
         $this->addOption('test-class', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_REQUIRED, 'The test class to be run');
     }
     $this->doConfigure();
 }
Exemplo n.º 4
0
 protected function configure()
 {
     parent::configure();
     $this->setName('help');
     $this->addArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help');
     $this->setDescription('Prints the help for a command.');
     $this->setHelp('The <info>help</info> command prints the help for the specified command:' . PHP_EOL . PHP_EOL . '  <info>testrunner help list</info>');
 }
 /**
  * {@inheritdoc}
  */
 protected function configure()
 {
     parent::configure();
     $this->ignoreValidationErrors();
     $this->setName('phpunit:passthrough');
     $this->setDescription('Runs the phpunit command via the testrunner command.');
     $this->setHelp('The <info>' . $this->getName() . '</info> command runs the command which is equivalent to the phpunit command except it allows you to declare multiple test classes in a file:' . PHP_EOL . PHP_EOL . '  <info>testrunner ' . $this->getName() . ' ...</info>');
     $this->addOption('phpunit-help', null, InputOption::VALUE_NONE, 'Prints the usage information for the phpunit command.');
 }