mirror of
https://github.com/php/php-src.git
synced 2024-10-18 23:12:35 +00:00
25 lines
438 B
Plaintext
25 lines
438 B
Plaintext
|
--TEST--
|
||
|
DomDocument::createAttribute() - basic test for DomDocument::createAttribute()
|
||
|
--CREDITS--
|
||
|
Muhammad Khalid Adnan
|
||
|
# TestFest 2008
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
$doc = new DOMDocument;
|
||
|
|
||
|
$node = $doc->createElement("para");
|
||
|
$newnode = $doc->appendChild($node);
|
||
|
|
||
|
// A pass case.
|
||
|
$test_attribute = $doc->createAttribute("hahaha");
|
||
|
$node->appendChild($test_attribute);
|
||
|
|
||
|
echo $doc->saveXML();
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
<?xml version="1.0"?>
|
||
|
<para hahaha=""/>
|
||
|
|