/** * @param array $args * * @return array */ public function read($args = []) { $args = $this->processOptions($args); $delim = "---<EOM>---"; $command = "git log {$args['revision range']} --pretty=format:\"{$this->format}{$delim}\""; $output = substr($this->shell->shell_exec($command), 0, -1 * strlen($delim . PHP_EOL)); $output = explode(PHP_EOL . $delim . PHP_EOL, $output); return $output; }
public function testShellExec_Real() { // Non-brittle - this value shouldn't change during test! $iam = shell_exec('whoami'); $shell = new Shell(); $this->assertEquals($iam, $shell->shell_exec('whoami')); }