From: Zoe Slattery Date: Thu, 2 Oct 2008 20:07:15 +0000 (+0000) Subject: Committting tests for Olafur Waage X-Git-Tag: BEFORE_HEAD_NS_CHANGE~295 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d39dae95f79a67959e4023126e09f047caae2c10;p=php Committting tests for Olafur Waage --- diff --git a/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt b/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt new file mode 100644 index 0000000000..521a81e101 --- /dev/null +++ b/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt @@ -0,0 +1,21 @@ +--TEST-- +SimpleXMLElement->addAttribute() +--SKIPIF-- + +--FILE-- +addAttribute('type','novels'); + + var_dump($simple->attributes()); + echo "Done"; +?> +--EXPECTF-- +object(SimpleXMLElement)#2 (1) { + [u"@attributes"]=> + array(1) { + [u"type"]=> + unicode(6) "novels" + } +} +Done diff --git a/ext/simplexml/tests/simplexml_load_file.phpt b/ext/simplexml/tests/simplexml_load_file.phpt new file mode 100644 index 0000000000..2eb8548e9e --- /dev/null +++ b/ext/simplexml/tests/simplexml_load_file.phpt @@ -0,0 +1,32 @@ +--TEST-- +simplexml_load_file() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +object(SimpleXMLElement)#1 (1) { + [u"book"]=> + array(2) { + [0]=> + object(SimpleXMLElement)#2 (2) { + [u"title"]=> + unicode(19) "The Grapes of Wrath" + [u"author"]=> + unicode(14) "John Steinbeck" + } + [1]=> + object(SimpleXMLElement)#3 (2) { + [u"title"]=> + unicode(9) "The Pearl" + [u"author"]=> + unicode(14) "John Steinbeck" + } + } +} +Done