Esempio n. 1
0
 public function testStatus()
 {
     $project = new Project('Twig Local');
     $this->assertEquals('no_build', $project->getStatusCode());
     $this->assertEquals('not built yet', $project->getStatus());
     $commit = $this->getMockBuilder('Sismo\\Commit')->disableOriginalConstructor()->getMock();
     $commit->expects($this->once())->method('getStatusCode')->will($this->returnValue('success'));
     $project->setCommits(array($commit));
     $this->assertEquals('success', $project->getStatusCode());
     $commit = $this->getMockBuilder('Sismo\\Commit')->disableOriginalConstructor()->getMock();
     $commit->expects($this->once())->method('getStatus')->will($this->returnValue('success'));
     $project->setCommits(array($commit));
     $this->assertEquals('success', $project->getStatus());
 }