1--TEST--
2<template> element manual creation
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8echo "=== After creation ===\n";
9
10$dom = Dom\HTMLDocument::createEmpty();
11$template = $dom->appendChild($dom->createElement("template"));
12var_dump($template->innerHTML);
13echo $dom->saveXML(), "\n";
14echo $dom->saveHTML(), "\n";
15
16echo "=== After setting content ===\n";
17
18$template->innerHTML = "<p>hello</template></p>";
19var_dump($template->innerHTML);
20var_dump($template->firstChild);
21echo $dom->saveXML(), "\n";
22echo $dom->saveHTML(), "\n";
23
24?>
25--EXPECT--
26=== After creation ===
27string(0) ""
28<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
29<template xmlns="http://www.w3.org/1999/xhtml"></template>
30<template></template>
31=== After setting content ===
32string(12) "<p>hello</p>"
33NULL
34<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
35<template xmlns="http://www.w3.org/1999/xhtml"><p>hello</p></template>
36<template><p>hello</p></template>
37