public function testA1() { $this->logger->info('START test A1 : XML files are wellformed and valid'); try { $this->logger->info(' Testing all XML/XSD files for well-formedness'); foreach ($this->standardExtractionContents->directoryContents->file as $file) { $xmlValidationTestProperty = new XMLWellFormedTestProperty(Constants::TEST_XMLTEST_VALIDATION_WELLFORMED); $xmlTestWellFormed = new XMLTestWellFormed(Constants::TEST_XMLTEST_VALIDATION_WELLFORMED, $this->directory, $file->filename, $xmlValidationTestProperty); $xmlTestWellFormed->runTest(); if ($xmlValidationTestProperty->getTestResult() == false) { $this->testProperty->setTestResult(false); } $this->testResultsHandler->addResult($xmlValidationTestProperty, Constants::TEST_TYPE_A1); $xmlTestWellFormed = null; } $this->logger->info(' Testing all XML files for validity'); foreach ($this->standardExtractionContents->filesToValidate->file as $file) { $testProperty = new XMLValidationTestProperty(Constants::TEST_XMLTEST_VALIDATION_VALID); $xmlTestValidation = new XMLTestValidation(Constants::TEST_XMLTEST_VALIDATION_VALID, $this->directory, $file->filename, $file->validatedBy, $testProperty); $xmlTestValidation->runTest(); if ($testProperty->getTestResult() == false) { $this->testProperty->setTestResult(false); } $this->testResultsHandler->addResult($testProperty, Constants::TEST_TYPE_A1); $xmlTestValidation = null; } } catch (Exception $e) { $this->logger->error("Error when attempting test A1. The following exception occured " . $e); } $this->logger->info('END test A1'); $this->logger->info(''); }