/**
  * SetupTeardownCommand constructor.
  *
  * @param null   $name
  * @param bool   $tearsDown
  * @param bool   $setsUp
  * @param string $description
  */
 public function __construct($name, $tearsDown = true, $setsUp = true, $description = '')
 {
     $this->setDescription($description);
     parent::__construct($name);
     $this->tearsDown = $tearsDown;
     $this->setsUp = $setsUp;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function configure()
 {
     if (null === $this->getName()) {
         $this->setName('crawl');
     }
     $this->setDescription('Execute a crawler session on a configuration.');
     $this->setHelp('Pass in the name of a PHP file that contains the crawler configuration.');
     $this->addArgument('filename', InputArgument::OPTIONAL, 'Path to a configuration file.', 'crawler.php');
     $this->addOption('reset', 'r', InputOption::VALUE_NONE, 'Run teardown/setup tasks before starting.');
     $this->addOption('chunk', 'c', InputOption::VALUE_REQUIRED, 'The concurrency to send requests at', 5);
     parent::configure();
 }