protected function runFeature($path = '', $feature = null, $parameters = array(), $config = 'behat.yml') { $parameters = array_merge($parameters, array('behat', '-f' => 'progress', '-v' => '', '-c' => $path . DIRECTORY_SEPARATOR . $config)); if (!$feature) { $parameters = array_merge($parameters, array('features' => $feature)); } try { $input = new ArrayInput($parameters); $output = new ConsoleOutput(); $result = self::$internalCommand->run($input, $output); $this->assertEquals(0, $result); } catch (\Exception $exception) { $this->fail($exception->getMessage()); } }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { if (isset($this->workerID)) { $this->runWorker(); return $this->getCliReturnCode(); } else { if ($this->processCount > 1) { $this->runParallel($input, $output); return $this->getCliReturnCode(); } else { return parent::execute($input, $output); } } }