2008-02-17 00:19:27 +00:00
|
|
|
--TEST--
|
|
|
|
HTMLPurifier.auto.php using spl_autoload_register with __autoload() already defined loading test
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (!function_exists('spl_autoload_register')) {
|
|
|
|
echo "skip - spl_autoload_register() not available";
|
|
|
|
}
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
function __autoload($class) {
|
2008-11-26 20:30:59 +00:00
|
|
|
echo "Autoloading $class...
|
|
|
|
";
|
2008-02-17 00:19:27 +00:00
|
|
|
eval("class $class {}");
|
|
|
|
}
|
|
|
|
|
2008-02-18 00:49:45 +00:00
|
|
|
require '../library/HTMLPurifier.auto.php';
|
|
|
|
require 'HTMLPurifier/PHPT/loading/_autoload.inc';
|
2008-02-17 00:19:27 +00:00
|
|
|
$config = HTMLPurifier_Config::createDefault();
|
|
|
|
$purifier = new HTMLPurifier($config);
|
2008-11-26 20:30:59 +00:00
|
|
|
echo $purifier->purify('<b>Salsa!') . "
|
|
|
|
";
|
2008-02-17 00:19:27 +00:00
|
|
|
|
|
|
|
// purposely invoke older autoload
|
|
|
|
$bar = new Bar();
|
|
|
|
|
|
|
|
--EXPECT--
|
|
|
|
<b>Salsa!</b>
|
2008-12-06 09:24:59 +00:00
|
|
|
Autoloading Bar...
|