Annotation of embedaddon/php/ext/tidy/tests/023.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: tidy and tidyNode OO
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded('tidy')) echo 'skip'; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: //test leaks here:
! 9: new tidy();
! 10: var_dump(new tidy());
! 11:
! 12: echo "-------\n";
! 13:
! 14: $tidy = new tidy();
! 15: $tidy->parseString('<html><?php echo "xpto;" ?></html>');
! 16:
! 17: var_dump(tidy_get_root($tidy)->child[0]->isHtml());
! 18: var_dump(tidy_get_root($tidy)->child[0]->child[0]->isPHP());
! 19: var_dump(tidy_get_root($tidy)->child[0]->child[0]->isAsp());
! 20: var_dump(tidy_get_root($tidy)->child[0]->child[0]->isJste());
! 21: var_dump(tidy_get_root($tidy)->child[0]->child[0]->type === TIDY_NODETYPE_PHP);
! 22:
! 23: var_dump(tidy_get_root($tidy)->child[0]->hasChildren());
! 24: var_dump(tidy_get_root($tidy)->child[0]->child[0]->hasChildren());
! 25:
! 26: ?>
! 27: --EXPECT--
! 28: object(tidy)#1 (2) {
! 29: ["errorBuffer"]=>
! 30: NULL
! 31: ["value"]=>
! 32: NULL
! 33: }
! 34: -------
! 35: bool(true)
! 36: bool(true)
! 37: bool(false)
! 38: bool(false)
! 39: bool(true)
! 40: bool(true)
! 41: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>