1--TEST-- 2DOMDocument::relaxNGValidate() should fail on invalid RelaxNG file source 3--CREDITS-- 4Knut Urdalen <knut@php.net> 5--EXTENSIONS-- 6dom 7--FILE-- 8<?php 9$rng = __DIR__.'/foo.rng'; 10$xml = <<< XML 11<?xml version="1.0"?> 12<apple> 13 <pear>Pear</pear> 14 <pear>Pear</pear> 15</apple> 16XML; 17$doc = new DOMDocument(); 18$doc->loadXML($xml); 19$result = $doc->relaxNGValidate($rng); 20var_dump($result); 21?> 22--EXPECTF-- 23Warning: DOMDocument::relaxNGValidate(): I/O %s : failed to load %s 24 25Warning: DOMDocument::relaxNGValidate(): xmlRelaxNGParse: could not load %s/foo.rng in %s on line %d 26 27Warning: DOMDocument::relaxNGValidate(): Invalid RelaxNG in %s on line %d 28bool(false) 29