xref: /PHP-7.0/ext/tidy/tests/020.phpt (revision aa6593f9)
1--TEST--
2OO 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>
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--EXPECT--
23bool(true)
24bool(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 />
34para testes.</p>
35</body>
36</html>
37