PATH:
home
/
letacommog
/
letaweb
/
admin
/
classes
/
htmlpurifier
/
tests
/
HTMLPurifier
/
PHPT
/
loading
--TEST-- Error when registering autoload with non-static autoload already on SPL stack --SKIPIF-- <?php if (!function_exists('spl_autoload_register')) { echo "skip - spl_autoload_register() not available"; } if (version_compare(PHP_VERSION, '5.2.11', '>=')) { echo "skip - non-buggy version of PHP"; } --FILE-- <?php class NotStatic { public function autoload($class) { echo "Autoloading... $class" . PHP_EOL; eval("class $class {}"); } } $obj = new NotStatic(); spl_autoload_register(array($obj, 'autoload')); try { require '../library/HTMLPurifier.auto.php'; } catch (Exception $e) { echo 'Caught error gracefully'; assert('strpos($e->getMessage(), "44144") !== false'); } --EXPECT-- Caught error gracefully
[+]
..
[-] auto-includes.phpt
[edit]
[-] auto.phpt
[edit]
[-] auto-with-spl-autoload-default.phpt
[edit]
[-] standalone-autoload.phpt
[edit]
[-] path-includes.phpt
[edit]
[-] safe-includes.phpt
[edit]
[-] error-auto-with-spl-nonstatic-autoload.phpt
[edit]
[-] auto-with-autoload.phpt
[edit]
[-] _autoload.inc
[edit]
[-] standalone.phpt
[edit]
[-] standalone-with-prefix.phpt
[edit]
[-] auto-with-spl-autoload.phpt
[edit]
[-] _no-autoload.inc
[edit]
[-] path-includes-autoload.phpt
[edit]
[-] auto-without-spl-with-autoload.phpt
[edit]
[-] auto-without-spl-autoload.phpt
[edit]