public function testGetRulesNamesProvidesArrayWithAllRulesNames()
 {
     $names = $this->subjectUnderTest->getRulesNames();
     $this->assertInternalType('array', $names);
     $this->assertCount(1, $names);
     $this->assertContains('Ubuntu', $names);
 }
Beispiel #2
0
 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');
 }