1--TEST--
2DOMDocument::relaxNGValidate() should fail if document doesn't validate
3--CREDITS--
4Knut Urdalen <knut@php.net>
5--SKIPIF--
6<?php
7require_once('skipif.inc');
8?>
9--FILE--
10<?php
11$rng = dirname(__FILE__).'/DOMDocument_relaxNGValidate_basic.rng';
12$xml = <<< XML
13<?xml version="1.0"?>
14<apple>
15  <pear>Pear</pear>
16  <pear>Pear</pear>
17</apple>
18XML;
19$doc = new DOMDocument();
20$doc->loadXML($xml);
21$result = $doc->relaxNGValidate($rng);
22var_dump($result);
23?>
24--EXPECTF--
25Warning: DOMDocument::relaxNGValidate(): Did not expect element pear there in %s on line %d
26bool(false)
27