getActiveBranchName() public method

public getActiveBranchName ( string | null $defaultBranch = null ) : string
$defaultBranch string | null
return string The branch name
Exemplo n.º 1
0
 /**
  * @test
  */
 public function gets_current_git_branch_name()
 {
     exec('git rev-parse --abbrev-ref HEAD', $output);
     if ('HEAD' === $output[0]) {
         $this->markTestSkipped('Unable to run this test in a detached HEAD state.');
     }
     $this->assertEquals($output[0], $this->git->getActiveBranchName());
 }