xref: /PHP-5.5/ext/tidy/tests/011.phpt (revision d94136fc)
1--TEST--
2Accessing attributes of a node
3--SKIPIF--
4<?php if (!extension_loaded("tidy")) print "skip"; ?>
5--FILE--
6<?php
7    	$a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>");
8        $body = $a->body();
9        var_dump($body->attribute);
10        foreach($body->attribute as $key=>$val) {
11            echo "Attrib '$key': $val\n";
12        }
13?>
14--EXPECT--
15array(2) {
16  ["bgcolor"]=>
17  string(7) "#FFFFFF"
18  ["alink"]=>
19  string(7) "#000000"
20}
21Attrib 'bgcolor': #FFFFFF
22Attrib 'alink': #000000