Annotation of embedaddon/php/ext/tidy/tests/011.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Accessing 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--
        !            15: array(2) {
        !            16:   ["bgcolor"]=>
        !            17:   string(7) "#FFFFFF"
        !            18:   ["alink"]=>
        !            19:   string(7) "#000000"
        !            20: }
        !            21: Attrib 'bgcolor': #FFFFFF
        !            22: Attrib 'alink': #000000

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>