public function testCCStatus() { $project = new Project('Twig Local'); $this->assertEquals('Unknown', $project->getCCStatus()); $commit = $this->getMockBuilder('Sismo\\Commit')->disableOriginalConstructor()->getMock(); $commit->expects($this->once())->method('isBuilt')->will($this->returnValue(true)); $commit->expects($this->once())->method('isSuccessful')->will($this->returnValue(true)); $project->setCommits(array($commit)); $this->assertEquals('Success', $project->getCCStatus()); $commit = $this->getMockBuilder('Sismo\\Commit')->disableOriginalConstructor()->getMock(); $commit->expects($this->once())->method('isBuilt')->will($this->returnValue(true)); $commit->expects($this->once())->method('isSuccessful')->will($this->returnValue(false)); $project->setCommits(array($commit)); $this->assertEquals('Failure', $project->getCCStatus()); }