Annotation of embedaddon/php/ext/tidy/tests/025.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: tidyNode tests
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded('tidy')) die('skip'); ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: $tidy=tidy_parse_string('<% %>', array('newline' => 'LF'));
                      9: var_dump($tidy->Root()->child[0]->isAsp());
                     10: 
                     11: $tidy=tidy_parse_string('<# #>',  array('newline' => 'LF'));
                     12: var_dump($tidy->Root()->child[0]->isJste());
                     13: 
                     14: $tidy=tidy_parse_string('<html><body>text</body></html>');
                     15: var_dump($tidy->Root()->child[0]->child[1]->child[0]->isText());
                     16: 
                     17: $tidy=tidy_parse_string('<html><body><!-- comment --></body></html>', array('newline' => 'LF'));
                     18: $n = $tidy->Root()->child[0]->child[1]->child[0];
                     19: var_dump($n->isComment());
                     20: var_dump((string)$n);
                     21: var_dump((bool)$n);
                     22: var_dump((double)$n);
                     23: var_dump((int)$n);
                     24: var_dump($tidy->Root()->child[0]->child[0]->hasSiblings());
                     25: 
                     26: ?>
                     27: --EXPECT--
                     28: bool(true)
                     29: bool(true)
                     30: bool(true)
                     31: bool(true)
                     32: string(16) "<!-- comment -->"
                     33: bool(true)
                     34: float(0)
                     35: int(0)
                     36: bool(true)

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