1--TEST--
2DOMDocument::relaxNGValidate() should fail if document doesn't validate
3--CREDITS--
4Knut Urdalen <knut@php.net>
5--EXTENSIONS--
6dom
7--FILE--
8<?php
9$rng = __DIR__.'/DOMDocument_relaxNGValidate_basic.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(): Did not expect element pear there in %s on line %d
24bool(false)
25