mirror of
https://github.com/php/php-src.git
synced 2024-10-05 00:36:17 +00:00
95accd75bb
add tests
27 lines
497 B
PHP
27 lines
497 B
PHP
--TEST--
|
|
DOMProcessingInstruction Tests
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
require_once("dom_test.inc");
|
|
|
|
$dom = new DOMDocument;
|
|
$dom->loadXML(b'<root />');
|
|
|
|
$pi = new DOMProcessingInstruction("mypi", "my instructions");
|
|
|
|
$dom->documentElement->appendChild($pi);
|
|
|
|
print $pi->target."\n";
|
|
print $pi->data."\n";
|
|
$pi->data = "my new instructions";
|
|
|
|
print $dom->saveXML();
|
|
?>
|
|
--EXPECT--
|
|
mypi
|
|
my instructions
|
|
<?xml version="1.0"?>
|
|
<root><?mypi my new instructions?></root>
|