From 67cde545acec46edddfbc239480f193b11bdce93 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 22 Dec 2009 00:47:08 +0100 Subject: [PATCH] Re-use $basedir. --- framework/Test/lib/Horde/Test/AllTests.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/Test/lib/Horde/Test/AllTests.php b/framework/Test/lib/Horde/Test/AllTests.php index 3372fc1a7..437645861 100644 --- a/framework/Test/lib/Horde/Test/AllTests.php +++ b/framework/Test/lib/Horde/Test/AllTests.php @@ -51,14 +51,13 @@ class Horde_Test_AllTests error_reporting(E_ALL | E_STRICT); // Set up autoload - set_include_path(dirname(self::$_file) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); + $basedir = dirname(self::$_file); + set_include_path($basedir . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - ' . self::$_package); - - $basedir = dirname(self::$_file); $baseregexp = preg_quote($basedir . DIRECTORY_SEPARATOR, '/'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) { -- 2.11.0