xref: /PHP-8.4/ext/tidy/tests/020.phpt (revision 7f2f0c00)
1--TEST--
2OO API
3--EXTENSIONS--
4tidy
5--FILE--
6<?php
7
8$tidy = new tidy();
9$str  = <<<EOF
10<p>Isto � um texto em Portugu�s<br>
11para testes.</p>
12EOF;
13
14$tidy->parseString($str, array('output-xhtml'=>1), 'latin1');
15$tidy->cleanRepair();
16$tidy->diagnose();
17var_dump(tidy_warning_count($tidy) > 0);
18var_dump(strlen($tidy->errorBuffer) > 50);
19
20echo $tidy;
21?>
22--EXPECTF--
23bool(true)
24bool(true)
25<?xml version="1.0" encoding="iso-8859-1"?>
26<!DOCTYPE html%A>
27<html xmlns="http://www.w3.org/1999/xhtml">
28<head>
29<title></title>
30</head>
31<body>
32<p>Isto � um texto em Portugu�s<br />
33para testes.</p>
34</body>
35</html>
36