/** * @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"); } }
public function test_fails_on_empty_xml() { $validator = new XsdValidator(); $arr = $validator->validateProtocol('<a><'); $this->assertGreaterThan(0, count($arr)); }