xref: /php-src/ext/tidy/tests/011.phpt (revision 7f2f0c00)
1--TEST--
2Accessing attributes of a node
3--EXTENSIONS--
4tidy
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
23