protected function execute($arguments = array(), $options = array()) { if (false == $options['forked']) { $php = opMultiExecutableTaskExec::findPhpBinary(); for ($it = $this->nextOptions(); false !== ($forkedOption = $it());) { $output = array(); $forkArguments = implode(' ', $arguments); $forkOptions = $this->optionsToString(array_merge($options, $forkedOption)); $command = $php . ' ' . sfConfig::get('sf_root_dir') . '/symfony ' . $forkArguments . ' ' . $forkOptions . ' --forked=true'; exec($command, &$output); foreach ($output as $line) { echo $line . "\n"; } } return; } unset($options['forked']); }
<?php include dirname(__FILE__) . '/../../bootstrap/unit.php'; $t = new lime_test(null, new lime_output_color()); $php = opMultiExecutableTaskExec::findPhpBinary(); $output = array(); $returnVar = 0; exec($php . ' -v', &$output, &$returnVar); $t->is($returnVar, 0);