public function testValidateWithErrors()
 {
     $dom = new DOMDocument();
     $dom->loadXML($this->getinvalidXml());
     $this->validator->validate($dom, true);
     $this->assertEquals(1, $this->validator->countErrors());
 }
 /**
  * Log errors generated during the validation.
  */
 private function logErrors(DtdValidator $validator)
 {
     foreach ($validator->getErrors() as $error) {
         $this->logger->warning(implode(':', array($error['file'], $error['line'], $error['message'])));
     }
 }