Example #1
0
 public function testSha()
 {
     $commit = new Commit(new Project('Twig'), '7d78d5f7a8c039059046d6c5e1d7f66765bd91c7');
     $this->assertEquals('7d78d5f7a8c039059046d6c5e1d7f66765bd91c7', $commit->getSha());
     $this->assertEquals('7d78d5', $commit->getShortSha());
 }
Example #2
0
 protected function getPlaceholders(Commit $commit)
 {
     $project = $commit->getProject();
     return array('%slug%' => $project->getSlug(), '%name%' => $project->getName(), '%status%' => $commit->getStatus(), '%status_code%' => $commit->getStatusCode(), '%STATUS%' => strtoupper($commit->getStatus()), '%sha%' => $commit->getSha(), '%short_sha%' => $commit->getShortSha(), '%author%' => $commit->getAuthor(), '%message%' => $commit->getMessage(), '%output%' => $commit->getOutput());
 }