/**
  * @param SamlElementInterface $samlElement
  */
 protected function validateProtocol(SamlElementInterface $samlElement)
 {
     $validator = new XsdValidator();
     $xml = $this->serialize($samlElement);
     $errors = $validator->validateProtocol($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));
 }