mirror of
https://github.com/php/php-src.git
synced 2024-10-16 22:12:33 +00:00
95accd75bb
add tests
28 lines
763 B
PHP
28 lines
763 B
PHP
--TEST--
|
|
DOMImplementation Tests
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
require_once("dom_test.inc");
|
|
|
|
$domimp = new DOMImplementation();
|
|
var_dump($domimp->hasFeature("1.0", "Core"));
|
|
|
|
$doctype = $domimp->createDocumentType("HTML", "-//W3C//DTD HTML 4.01//EN", "http://www.w3.org/TR/html4/strict.dtd");
|
|
|
|
$dom = $domimp->createDocument(NULL, "HTML", $doctype);
|
|
|
|
$html = $dom->documentElement;
|
|
|
|
$html->appendChild(new DOMElement("body", "hello world"));
|
|
$html->firstChild->appendChild(new DOMEntityReference("preformatted"));
|
|
|
|
print $dom->saveXML();
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
<?xml version="1.0"?>
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<HTML><body>hello world&preformatted;</body></HTML>
|