[3.0.0] Upgraded test scripts and other goodies. Also removed some PHP4 cruft.
[htmlpurifier/darkodev.git] / smoketests / loadFunc.php
blobbff9a8797cd67d5721adcafbb6326c4318cf7a9c
1 <?php
3 set_include_path('../library/' . PATH_SEPARATOR . get_include_path() );
5 header('Content-type: text/html; charset=UTF-8');
6 echo '<?xml version="1.0" encoding="UTF-8" ?>';
8 function printb($bool) {
9 echo '<strong>' . ($bool ? 'Pass' : 'Fail') . '</strong>';
12 function printEval($code) {
13 echo '<pre>' . htmlspecialchars($code) . '</pre>';
14 eval($code);
17 ?><!DOCTYPE html
18 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
19 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
20 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
21 <head>
22 <title>HTML Purifier Function Include Smoketest</title>
23 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
24 </head>
25 <body>
26 <h1>HTML Purifier Function Include Smoketest</h1>
28 <p>Tests whether or not the includes are done properly and whether or
29 not the library is lazy loaded.</p>
31 <?php printEval("require_once 'HTMLPurifier.func.php';"); ?>
33 <p>HTMLPurifier class doesn't exist: <?php printb(!class_exists('HTMLPurifier')); ?></li></p>
35 <?php printEval("HTMLPurifier('foobar');"); ?>
37 <p>HTMLPurifier class exists: <?php printb(class_exists('HTMLPurifier')); ?></li></p>
39 </body>
40 </html>