From: Christian Stocker Date: Mon, 27 Oct 2003 17:51:55 +0000 (+0000) Subject: extending of domDocument class test X-Git-Tag: RELEASE_2_0_0RC1~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=901153b441ffe736c1639dfcda42109791d655cf;p=php extending of domDocument class test --- diff --git a/ext/dom/tests/dom006.phpt b/ext/dom/tests/dom006.phpt new file mode 100644 index 0000000000..7f393003d5 --- /dev/null +++ b/ext/dom/tests/dom006.phpt @@ -0,0 +1,46 @@ +--TEST-- +Test 6: Extends Test +--SKIPIF-- + +--FILE-- +createElement("title"); + $titleElement->appendChild($this->createTextNode($title)); + $authorElement = $this->createElement("author"); + $authorElement->appendChild($this->createTextNode($author)); + + $bookElement = $this->createElement("book"); + + $bookElement->appendChild($titleElement); + $bookElement->appendChild($authorElement); + $this->documentElement->appendChild($bookElement); + } + +} + +$dom = new books; + +$dom->load(dirname(__FILE__)."/book.xml"); +$dom->addBook("PHP de Luxe", "Richard Samar, Christian Stocker"); +print $dom->saveXML(); +--EXPECT-- + + + + The Grapes of Wrath + John Steinbeck + + + The Pearl + John Steinbeck + +PHP de LuxeRichard Samar, Christian Stocker