예제 #1
0
파일: sismo.php 프로젝트: ronzalo/dyl_s2
 private function createCommit($project, $result)
 {
     $commit = new Commit($project, $result['sha']);
     $commit->setAuthor($result['author']);
     $commit->setMessage($result['message']);
     $commit->setDate(\DateTime::createFromFormat('Y-m-d H:i:s', $result['date']));
     if ($result['build_date']) {
         $commit->setBuildDate(\DateTime::createFromFormat('Y-m-d H:i:s', $result['build_date']));
     }
     $commit->setStatusCode($result['status']);
     $commit->setOutput($result['output']);
     return $commit;
 }
예제 #2
0
파일: CommitTest.php 프로젝트: rouffj/Sismo
 public function testBuildDate()
 {
     $commit = new Commit(new Project('Twig'), '7d78d5f7a8c039059046d6c5e1d7f66765bd91c7');
     $commit->setBuildDate($date = new \DateTime());
     $this->assertEquals($date, $commit->getBuildDate());
 }