Annotation of embedaddon/php/ext/tidy/tests/020.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: OO API
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("tidy")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $tidy = new tidy();
! 9: $str = <<<EOF
! 10: <p>Isto é um texto em Português<br>
! 11: para testes.</p>
! 12: EOF;
! 13:
! 14: $tidy->parseString($str, array('output-xhtml'=>1), 'latin1');
! 15: $tidy->cleanRepair();
! 16: $tidy->diagnose();
! 17: var_dump(tidy_warning_count($tidy) > 0);
! 18: var_dump(strlen($tidy->errorBuffer) > 50);
! 19:
! 20: echo $tidy;
! 21: ?>
! 22: --EXPECT--
! 23: bool(true)
! 24: bool(true)
! 25: <?xml version="1.0" encoding="iso-8859-1"?>
! 26: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
! 27: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
! 28: <html xmlns="http://www.w3.org/1999/xhtml">
! 29: <head>
! 30: <title></title>
! 31: </head>
! 32: <body>
! 33: <p>Isto é um texto em Português<br />
! 34: para testes.</p>
! 35: </body>
! 36: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>