Example #1
0
 /**
  * @param string $branch
  * @return bool
  */
 public function hasRemoteBranch($branch)
 {
     $output = $this->run('show-branch', ['--list', '-r']);
     //        $output = $this->run('ls-remote', []); //super slow
     $branches = GitOutputHelper::extractRemoteBranches($output);
     $result = in_array($branch, $branches);
     return $result;
 }
Example #2
0
 /**
  * @param string $pattern
  * @param array  $expected
  *
  * @dataProvider dataProviderTestExtractRemoteBranches2
  */
 public function testExtractRemoteBranches2($pattern, $expected)
 {
     $actual = GitOutputHelper::extractRemoteBranches2($pattern);
     $this->assertEquals($actual, $expected);
 }