diff options
| author | Sterling Hughes <sterling@php.net> | 2004-01-16 20:50:29 +0000 |
|---|---|---|
| committer | Sterling Hughes <sterling@php.net> | 2004-01-16 20:50:29 +0000 |
| commit | 7f5b508f26b32f02bce859f6d9c801224291419b (patch) | |
| tree | 50c5b42f79029ab973463ce6ecd58bbd53247319 /ext/simplexml/tests/profile06.phpt | |
| parent | 69e6b296e0f6e4e8c94300e3a7f74c2bce690e87 (diff) | |
| download | php-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.phpt | 19 |
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--- |
