Beispiel #1
0
 public function prepare(BehatWrapper $behat, BehatCommand $command, $cwd = null)
 {
     // Build the command line options, flags, and arguments.
     $binary = ProcessUtils::escapeArgument($behat->getBehatBinary());
     $commandLine = rtrim($binary . ' ' . $command->getCommandLine());
     parent::__construct($commandLine, $cwd, null, null, $behat->getTimeout(), array());
 }
 /**
  * {@inheritdoc}
  */
 public function start($callback = null)
 {
     $event = new Event\BehatPrepareEvent($this->behat, $this, $this->command);
     $dispatcher = $this->behat->getDispatcher();
     $dispatcher->dispatch(Event\BehatEvents::BEHAT_PREPARE, $event);
     $this->prepare($this->behat, $this->command, $this->cwd);
     parent::start($callback);
 }
 public function runBadCommand($catchException = false)
 {
     try {
         $this->wrapper->behat('--what');
     } catch (BehatException $e) {
         if (!$catchException) {
             throw $e;
         }
     }
 }