コード例 #1
0
 /**
  * @test
  */
 public function getCommitCountWithTypeDoesNotReturnWrongTopicCommitCount()
 {
     $commit = new \Mrimann\CoMo\Domain\Model\Commit();
     $commit->setCommitLine('[BUGFIX] foo bar');
     $this->fixture->addCommit($commit);
     $this->assertEquals(0, $this->fixture->getCommitCountByType('feature'));
 }
コード例 #2
0
 /**
  * Creates an award of a given type
  *
  * @param string the type of the award
  * @param string the month identifier
  * @param \Mrimann\CoMo\Domain\Model\AggregatedDataPerUser $winner
  *
  * @return \Mrimann\CoMo\Domain\Model\Award the new award
  */
 protected function createNewAward($type, $monthIdentifier, \Mrimann\CoMo\Domain\Model\AggregatedDataPerUser $winner)
 {
     $award = new \Mrimann\CoMo\Domain\Model\Award();
     $award->setUserEmail($winner->getUserEmail());
     $award->setUserName($winner->getUserName());
     $award->setType($type);
     $award->setMonth($monthIdentifier);
     $award->setCommitCount($winner->getCommitCountByType($type));
     $this->awardRepository->add($award);
     return $award;
 }