Ejemplo n.º 1
0
 public function testC1()
 {
     $this->logger->info('START test C1  :');
     $testProperty = new TestProperty(Constants::TEST_INCOMING_REGISTRYENTRY_SIGNEDOFF);
     try {
         $allDocumentChecksumTest = new Test(Constants::TEST_INCOMING_REGISTRYENTRY_SIGNEDOFF, $testProperty);
         // We don't call $allDocumentChecksumTest->runTest because the test is handled
         // in ArkivstrukturDocumentChecksumTest durnig parsing of the file
         $akivstrukturParser = new AllIncomingRegistryEntrySignedOff();
         $this->parseFile($akivstrukturParser, $this->arkivstrukturFilename);
         $akivstrukturParser->testOver();
         $numberIncomingRegistryEntryfound = $akivstrukturParser->getNumberIncomingRegistryEntryfound();
         if ($akivstrukturParser->getErrorsEncountered() == true) {
             $numberRegistryEntryWithError = $akivstrukturParser->getNumberErrorsEncountered();
             $this->logger->error(' RESULT (' . $numberIncomingRegistryEntryfound . ') incoming registryentry processed. (' . $numberRegistryEntryWithError . ') missing a signoff/avskrivning');
             $testProperty->addTestResultReportDescription('Det var funnet feil med sjeksumm av filer i dokument mappen. Antall feil funnet er ' . $akivstrukturParser->getNumberErrorsEncountered() . ' logfilen inneholder en liste av filer som ble sjekket');
             $this->testProperty->setTestResult(false);
         } else {
             $this->logger->info(' RESULT All incoming registryentry, count (' . $numberIncomingRegistryEntryfound . ') are processed without error');
         }
         $this->testResultsHandler->addResult($testProperty, Constants::TEST_TYPE_C1);
     } catch (Exception $e) {
         $this->logger->error("Error when attempting test " . $testProperty->getDescription() . ". The following exception occured " . $e);
     }
     $this->logger->info('END test C1');
     $this->logger->info('');
 }