/** * @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]]; }
/** * @covers DmMailer\Repository\Campaign */ public function testGetCampaignCount() { $actualResult = $this->sut->getCampaignCount(); $this->assertEquals(3, $actualResult); }