Exemple #1
0
 public function testAbbreviateHash()
 {
     $strategymock = $this->getMock('GitPHP_ProjectLoadStrategy_Interface');
     $strategymock->expects($this->once())->method('AbbreviateHash')->with($this->isInstanceOf('GitPHP_Project'), $this->equalTo('longhash'))->will($this->returnValue('shorthash'));
     $project = new GitPHP_Project(GITPHP_TEST_PROJECTROOT, 'testrepo.git', $strategymock);
     $this->assertEquals('shorthash', $project->AbbreviateHash('longhash'));
 }