public function testXmlBase() { $this->if($loader = new XmlLoader())->and($data = $loader->loadFromFile('test/data/TestXml/TestBase.xml'))->and($config = $loader->loadFromFile('test/data/TestXml/Schema.xml'))->and($object = new testedClass())->then->boolean($object->validate($config, $data))->isEqualTo(true); }
public function validate(array $data) { $data_validator = new SchemaValidator(); return $data_validator->validate($this->schema, $data); }