예제 #1
0
 public function testHead()
 {
     $strategymock = $this->getMock('GitPHP_ProjectLoadStrategy_Interface');
     $strategymock->expects($this->once())->method('LoadHead')->with($this->isInstanceOf('GitPHP_Project'))->will($this->returnValue('refs/heads/master'));
     $project = new GitPHP_Project(GITPHP_TEST_PROJECTROOT, 'testrepo.git', $strategymock);
     $this->assertEquals('refs/heads/master', $project->GetHeadReference());
     $this->assertEquals('refs/heads/master', $project->GetHeadReference());
     //cached
 }