features/bootstrap/FeatureContext.php
public function xmlShouldBeValid($xmlFile, $schemaPath)
    {
        $dom = new DomDocument();
        $dom->load($this->workingDir . '/' . $xmlFile);

        $dom->schemaValidate(__DIR__ . '/schema/' . $schemaPath);
    }
public function xmlShouldBeValid($xmlFile, $schemaPath)
    {
        $dom = new DomDocument();
        $dom->load($this->workingDir . '/' . $xmlFile);

        $dom->schemaValidate(__DIR__ . '/schema/' . $schemaPath);
    }
public function xmlShouldBeValid ( $ xmlFile , $ schemaPath ) { $ dom = new DomDocument ( ) ; $ dom -> load ( $ this -> workingDir . '/' . $ xmlFile ) ; $ dom -> schemaValidate ( __DIR__ . '/schema/' . $ schemaPath ) ; }
Checks whether the file is valid according to an XML schema.

@Then /^the file "([^"]+)" should be a valid document according to "([^"]+)"$/

@param string $xmlFile
@param string $schemaPath relative to features/bootstrap/schema
Checks whether the file is valid according to an XML schema .