Пример #1
0
 /**
  * @param array $args
  *
  * @return array
  */
 public function read($args = [])
 {
     $args = $this->processOptions($args);
     $this->shell->exec('git fetch -u');
     $this->shell->exec("git log {$args['revision range']} --pretty=format:%s", $output);
     return $output;
 }
Пример #2
0
 public function testProjectDir()
 {
     $projectDir = __DIR__ . '/../../../../';
     $shell = new Shell($projectDir);
     $testCommand = 'vendor/bin/phpunit';
     $result = $shell->exec($testCommand, ['--version']);
     $this->assertContains('PHPUnit', $result);
 }
Пример #3
0
 public function testExec_real()
 {
     $iam = exec('whoami');
     $shell = new Shell();
     $output = array();
     $this->assertEquals($iam, $shell->exec('whoami', $output, $returnVar));
     $this->assertEquals($iam, implode('', $output), 'Real output of whoami unexpected');
     $this->assertSame(0, $returnVar, 'exec of whoami had bad return status');
 }