示例#1
0
 /**
  * @return array
  */
 private function getCampaignCount()
 {
     $count = $this->campaignRepo->getCampaignCount();
     $kpiType = self::INFO;
     if ($count < 1 || $count > 50) {
         $kpiType = self::DANGER;
     } elseif ($count > 10) {
         $kpiType = self::WARNING;
     }
     return [self::CAMPAIGN_COUNT => [self::VALUE => $count, self::TYPE => $kpiType]];
 }
示例#2
0
 /**
  * @covers DmMailer\Repository\Campaign
  */
 public function testGetCampaignCount()
 {
     $actualResult = $this->sut->getCampaignCount();
     $this->assertEquals(3, $actualResult);
 }