Пример #1
0
 /**
  * Runs openl10n command with provided parameters
  *
  * @When /^I run "openl10n(?: ((?:\"|[^"])*))?"$/
  *
  * @param string $argumentsString
  */
 public function iRunOpenl10n($argumentsString = '')
 {
     $argumentsString = strtr($argumentsString, array('\'' => '"'));
     $fh = tmpfile();
     $input = new \Symfony\Component\Console\Input\StringInput($argumentsString);
     $output = new \Symfony\Component\Console\Output\StreamOutput($fh);
     $this->commandExitCode = $this->application->run($input, $output);
     fseek($fh, 0);
     $output = '';
     while (!feof($fh)) {
         $output = fread($fh, 4096);
     }
     fclose($fh);
     $this->commandOutput = $output;
 }