From c004a0ff3f8437951328044aafd3a5327b52679e Mon Sep 17 00:00:00 2001 From: Gunnar Wrobel Date: Thu, 25 Nov 2010 15:24:06 +0100 Subject: [PATCH] Use Horde_Test for autoloading. --- components/test/Components/Autoload.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/components/test/Components/Autoload.php b/components/test/Components/Autoload.php index 2fde5e569..6ec989618 100644 --- a/components/test/Components/Autoload.php +++ b/components/test/Components/Autoload.php @@ -17,18 +17,7 @@ * @link http://pear.horde.org/index.php?package=Components */ -if (!spl_autoload_functions()) { - spl_autoload_register( - create_function( - '$class', - '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class);' - . '$err_mask = E_ALL ^ E_WARNING;' - . '$oldErrorReporting = error_reporting($err_mask);' - . 'include "$filename.php";' - . 'error_reporting($oldErrorReporting);' - ) - ); -} +require_once 'Horde/Test/Autoload.php'; if (!class_exists('Components')) { set_include_path(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); @@ -37,7 +26,6 @@ if (!class_exists('Components')) { /** Catch strict standards */ error_reporting(E_ALL | E_STRICT); - /** Load the basic test definition */ require_once dirname(__FILE__) . '/StoryTestCase.php'; -- 2.11.0