summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/profile06.phpt
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2004-01-16 20:50:29 +0000
committerSterling Hughes <sterling@php.net>2004-01-16 20:50:29 +0000
commit7f5b508f26b32f02bce859f6d9c801224291419b (patch)
tree50c5b42f79029ab973463ce6ecd58bbd53247319 /ext/simplexml/tests/profile06.phpt
parent69e6b296e0f6e4e8c94300e3a7f74c2bce690e87 (diff)
downloadphp-git-7f5b508f26b32f02bce859f6d9c801224291419b.tar.gz
Add a "profile" of simplexml's expected behaviour in the form of tests.
This will be expanded as issues arise and will be a formal definition (in code) of simplexml's behaviour.
Diffstat (limited to 'ext/simplexml/tests/profile06.phpt')
-rw-r--r--ext/simplexml/tests/profile06.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/simplexml/tests/profile06.phpt b/ext/simplexml/tests/profile06.phpt
new file mode 100644
index 0000000000..e1817f30a9
--- /dev/null
+++ b/ext/simplexml/tests/profile06.phpt
@@ -0,0 +1,19 @@
+--TEST--
+SimpleXML [profile]: Accessing a namespaced attribute
+--SKIPIF--
+<?php if (!extension_loaded("simplexml")) print "skip"; ?>
+--FILE--
+<?php
+error_reporting(E_ALL & ~E_NOTICE);
+$root = simplexml_load_string('<?xml version="1.0"?>
+<root xmlns:reserved="reserved-ns">
+ <child reserved:attribute="Sample" />
+</root>
+');
+
+echo $root->child['reserved:attribute'];
+echo "\n---Done---\n";
+?>
+--EXPECT--
+Sample
+---Done---