php-src/ext/dom/tests/DOMDocument_relaxNGValidateSource_basic.phpt
Max Semenik bd9f4fa676 Migrate skip checks to --EXTENSIONS--, p2
For rationale, see https://github.com/php/php-src/pull/6787

Make extension checks lowercase, add a special case for opcache
that has internal name not matching .so filename.

Extensions migrated in part 2:
* dom
* exif
* fileinfo
* ffi
2021-04-01 12:08:24 +01:00

37 lines
689 B
PHP

--TEST--
DOMDocument::relaxNGValidateSource()
--CREDITS--
Knut Urdalen <knut@php.net>
--EXTENSIONS--
dom
--FILE--
<?php
$rng = <<< RNG
<?xml version="1.0" encoding="UTF-8"?>
<grammar ns="" xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<element name="apple">
<element name="pear">
<data type="NCName"/>
</element>
</element>
</start>
</grammar>
RNG;
$good_xml = <<< GOOD_XML
<?xml version="1.0"?>
<apple>
<pear>Pear</pear>
</apple>
GOOD_XML;
$doc = new DOMDocument();
$doc->loadXML($good_xml);
$result = $doc->relaxNGValidateSource($rng);
var_dump($result);
?>
--EXPECT--
bool(true)