/**
  * {@inheritdoc}
  */
 public function process(ContainerInterface $container, InputInterface $input, OutputInterface $output)
 {
     if (preg_match('/^\\@([^\\/\\\\]+)(.*)$/', $input->getArgument('features'), $matches)) {
         $bundle = $container->get('kernel')->getBundle($matches[1]);
         $input->setArgument('features', realpath($bundle->getPath()) . DIRECTORY_SEPARATOR . 'Features' . $matches[2]);
     }
     parent::process($container, $input, $output);
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 public function process(ContainerInterface $container, InputInterface $input, OutputInterface $output)
 {
     // ignore location if no features argument provided
     if (!$input->getArgument('features')) {
         return;
     }
     if (preg_match('/^\\@([^\\/\\\\]+)(.*)$/', $input->getArgument('features'), $matches)) {
         $bundle = $container->get('kernel')->getBundle($matches[1]);
         $prefix = $container->getParameter('behat.namespace.prefix') ? DIRECTORY_SEPARATOR . trim($container->getParameter('behat.namespace.prefix'), '\\') : null;
         $input->setArgument('features', realpath($bundle->getPath()) . $prefix . DIRECTORY_SEPARATOR . 'Features' . $matches[2]);
     }
     parent::process($container, $input, $output);
 }
示例#3
0
 public function process(InputInterface $input, OutputInterface $output)
 {
     parent::process($input, $output);
     if ($input->getArgument('features')) {
         return;
     }
     $modsPath = realpath(__DIR__ . '/../../protected/modules');
     $paths = array(__DIR__ . '/..');
     foreach (Finder::create()->directories()->depth(0)->in($modsPath) as $path) {
         if (file_exists($path . '/features')) {
             $paths[] = $path . '/features';
         }
     }
     $this->container->get('behat.console.command')->setFeaturesPaths($paths);
 }