diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/tidy/tests/011.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/tidy/tests/011.phpt')
-rw-r--r-- | ext/tidy/tests/011.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/tidy/tests/011.phpt b/ext/tidy/tests/011.phpt new file mode 100644 index 0000000..2a94616 --- /dev/null +++ b/ext/tidy/tests/011.phpt @@ -0,0 +1,22 @@ +--TEST-- +Accessing attributes of a node +--SKIPIF-- +<?php if (!extension_loaded("tidy")) print "skip"; ?> +--FILE-- +<?php + $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>"); + $body = $a->body(); + var_dump($body->attribute); + foreach($body->attribute as $key=>$val) { + echo "Attrib '$key': $val\n"; + } +?> +--EXPECT-- +array(2) { + ["bgcolor"]=> + string(7) "#FFFFFF" + ["alink"]=> + string(7) "#000000" +} +Attrib 'bgcolor': #FFFFFF +Attrib 'alink': #000000
\ No newline at end of file |