Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function initFeaturesDirectoryStructure(PathLocator $locator, OutputInterface $output)
 {
     parent::initFeaturesDirectoryStructure($locator, $output);
     $base_path = realpath($locator->getWorkPath()) . DIRECTORY_SEPARATOR;
     $config_path = $base_path . 'config';
     if (!is_dir($config_path)) {
         mkdir($config_path, 0777, true);
         $output->writeln(sprintf('<info>+d</info> %s <comment>- edit you config settings here</comment>', str_replace($base_path, '', $config_path)));
         file_put_contents($config_path . DIRECTORY_SEPARATOR . 'behat.yml', $this->getConfigSkelet());
         $output->writeln(sprintf('<info>+f</info> %sbehat.yml <comment>- place your feature related code here</comment>', str_replace($base_path . DIRECTORY_SEPARATOR, '', $config_path)));
     }
 }
 /**
  * @param Command $command
  */
 public function configure(Command $command)
 {
     parent::configure($command);
     $command->addOption('--namespace', null, InputOption::VALUE_OPTIONAL, "Optional namespace for FeatureContext, defaults to <foldername>\\Test\\Behaviour.\n");
 }