mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00

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
37 lines
689 B
PHP
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)
|