private function initializeRules() { $this->logger->debug('Initialization of rules started'); $this->downloadRules = []; $rules = $this->configurationProvider->getRulesNames(); $this->logger->debug('Found ' . count($rules) . ' rule(s)'); foreach ($rules as $ruleName) { $this->logger->debug("Initializing {$ruleName} rule"); $this->downloadRules[] = $this->configurationProvider->getRule($ruleName); //In that case it will never return false since names are sourced from getRulesNames() $this->logger->debug("{$ruleName} rule initialized"); } $this->logger->debug('All rules ready'); }
public function testGetRuleReturnsFalseForUnknownRule() { $configuration = $this->subjectUnderTest->getRule('PiratedStuff'); $this->assertFalse($configuration); }