/**
  * @param SamlElementInterface $samlElement
  */
 protected function validateMetadata(SamlElementInterface $samlElement)
 {
     $validator = new XsdValidator();
     $xml = $this->serialize($samlElement);
     $errors = $validator->validateMetadata($xml);
     if ($errors) {
         $this->fail("\n" . implode("\n", $errors) . "\n\n{$xml}\n\n");
     }
 }
示例#2
0
 public function test_fails_on_empty_xml()
 {
     $validator = new XsdValidator();
     $arr = $validator->validateProtocol('<a><');
     $this->assertGreaterThan(0, count($arr));
 }