You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
666B

  1. --TEST--
  2. HTMLPurifier.auto.php using spl_autoload_register with __autoload() already defined loading test
  3. --SKIPIF--
  4. <?php
  5. if (!function_exists('spl_autoload_register')) {
  6. echo "skip - spl_autoload_register() not available";
  7. }
  8. --FILE--
  9. <?php
  10. function __autoload($class) {
  11. echo "Autoloading $class...
  12. ";
  13. eval("class $class {}");
  14. }
  15. require '../library/HTMLPurifier.auto.php';
  16. require 'HTMLPurifier/PHPT/loading/_autoload.inc';
  17. $config = HTMLPurifier_Config::createDefault();
  18. $purifier = new HTMLPurifier($config);
  19. echo $purifier->purify('<b>Salsa!') . "
  20. ";
  21. // purposely invoke older autoload
  22. $bar = new Bar();
  23. --EXPECT--
  24. <b>Salsa!</b>
  25. Autoloading Bar...