From: Jan Schneider Date: Thu, 3 Dec 2009 11:13:50 +0000 (+0100) Subject: Fix viral parse error. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5c22333454bef0c505ebaca9a9356c93379be6b3;p=horde.git Fix viral parse error. --- diff --git a/framework/Argv/test/Horde/Argv/AllTests.php b/framework/Argv/test/Horde/Argv/AllTests.php index e8b56f111..a97d8f6fd 100644 --- a/framework/Argv/test/Horde/Argv/AllTests.php +++ b/framework/Argv/test/Horde/Argv/AllTests.php @@ -40,9 +40,9 @@ class Horde_Argv_AllTests { error_reporting(E_ALL | E_STRICT); // Set up autoload - set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } // Test base classes and helper objects diff --git a/framework/Constraint/test/Horde/Constraint/AllTests.php b/framework/Constraint/test/Horde/Constraint/AllTests.php index 02333c4d5..cef8231dd 100644 --- a/framework/Constraint/test/Horde/Constraint/AllTests.php +++ b/framework/Constraint/test/Horde/Constraint/AllTests.php @@ -20,10 +20,11 @@ class Horde_Constraint_AllTests public static function suite() { + // Set up autoload + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } - set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Constraint'); diff --git a/framework/Controller/test/Horde/Controller/AllTests.php b/framework/Controller/test/Horde/Controller/AllTests.php index a366d50c7..841f3c673 100644 --- a/framework/Controller/test/Horde/Controller/AllTests.php +++ b/framework/Controller/test/Horde/Controller/AllTests.php @@ -37,9 +37,10 @@ class Horde_Controller_AllTests { public static function suite() { + // Set up autoload set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Controller'); diff --git a/framework/Date/test/Horde/Date/AllTests.php b/framework/Date/test/Horde/Date/AllTests.php index 302deaf96..4c884e9b1 100644 --- a/framework/Date/test/Horde/Date/AllTests.php +++ b/framework/Date/test/Horde/Date/AllTests.php @@ -23,9 +23,10 @@ class Horde_Date_AllTests { public static function suite() { + // Set up autoload set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Date'); diff --git a/framework/Db/test/Horde/Db/AllTests.php b/framework/Db/test/Horde/Db/AllTests.php index 2c035baae..d84cf29b3 100644 --- a/framework/Db/test/Horde/Db/AllTests.php +++ b/framework/Db/test/Horde/Db/AllTests.php @@ -44,10 +44,10 @@ class Horde_Db_AllTests { // Ensure a default timezone is set. date_default_timezone_set('America/New_York'); - // Set up include_path and autoloading - set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); + // Set up autoload + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } // Build the suite diff --git a/framework/Feed/test/Horde/Feed/AllTests.php b/framework/Feed/test/Horde/Feed/AllTests.php index 016b6e12d..0c4fc14ed 100644 --- a/framework/Feed/test/Horde/Feed/AllTests.php +++ b/framework/Feed/test/Horde/Feed/AllTests.php @@ -20,8 +20,10 @@ class Horde_Feed_AllTests public static function suite() { + // Set up autoload + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Feed'); diff --git a/framework/Http/test/Horde/Http/AllTests.php b/framework/Http/test/Horde/Http/AllTests.php index 1c18ab856..fa9e6b574 100644 --- a/framework/Http/test/Horde/Http/AllTests.php +++ b/framework/Http/test/Horde/Http/AllTests.php @@ -23,9 +23,10 @@ class Horde_Http_AllTests public static function suite() { + // Set up autoload set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Http'); diff --git a/framework/Injector/test/Horde/Injector/AllTests.php b/framework/Injector/test/Horde/Injector/AllTests.php index 5f97f04a1..fa64bf2e0 100644 --- a/framework/Injector/test/Horde/Injector/AllTests.php +++ b/framework/Injector/test/Horde/Injector/AllTests.php @@ -20,10 +20,11 @@ class Horde_Injector_AllTests public static function suite() { + // Set up autoload + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } - set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Injector'); diff --git a/framework/Log/test/Horde/Log/AllTests.php b/framework/Log/test/Horde/Log/AllTests.php index 1735d1140..0abfe3fa3 100644 --- a/framework/Log/test/Horde/Log/AllTests.php +++ b/framework/Log/test/Horde/Log/AllTests.php @@ -39,10 +39,11 @@ class Horde_Log_AllTests public static function suite() { + // Set up autoload + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } - set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); $suite = new PHPUnit_Framework_TestSuite('Horde_Log'); diff --git a/framework/Pdf/test/Horde/Pdf/AllTests.php b/framework/Pdf/test/Horde/Pdf/AllTests.php index fd810343d..176051dcc 100644 --- a/framework/Pdf/test/Horde/Pdf/AllTests.php +++ b/framework/Pdf/test/Horde/Pdf/AllTests.php @@ -31,9 +31,10 @@ class Horde_Pdf_AllTests public static function suite() { - set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); + // Set up autoload + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Pdf'); diff --git a/framework/Stream_Filter/test/Horde/Stream/Filter/AllTests.php b/framework/Stream_Filter/test/Horde/Stream/Filter/AllTests.php index 1094d66ac..4377489fe 100644 --- a/framework/Stream_Filter/test/Horde/Stream/Filter/AllTests.php +++ b/framework/Stream_Filter/test/Horde/Stream/Filter/AllTests.php @@ -31,9 +31,9 @@ class Horde_Stream_Filter_AllTests error_reporting(E_ALL | E_STRICT); // Set up autoload - set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Stream_Filter'); diff --git a/framework/Support/test/Horde/Support/AllTests.php b/framework/Support/test/Horde/Support/AllTests.php index 5f65318cc..a07e87e3c 100644 --- a/framework/Support/test/Horde/Support/AllTests.php +++ b/framework/Support/test/Horde/Support/AllTests.php @@ -23,9 +23,10 @@ class Horde_Support_AllTests { public static function suite() { + // Set up autoload set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } $suite = new PHPUnit_Framework_TestSuite('Horde Framework - Horde_Support'); diff --git a/framework/View/test/Horde/View/AllTests.php b/framework/View/test/Horde/View/AllTests.php index 736e067d2..fba118acb 100644 --- a/framework/View/test/Horde/View/AllTests.php +++ b/framework/View/test/Horde/View/AllTests.php @@ -31,9 +31,9 @@ class Horde_View_AllTests { date_default_timezone_set('America/New_York'); // Set up autoload - set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); include "$filename.php";')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } // Build the suite diff --git a/framework/Yaml/test/Horde/Yaml/AllTests.php b/framework/Yaml/test/Horde/Yaml/AllTests.php index 35fe686ab..021dca4fc 100644 --- a/framework/Yaml/test/Horde/Yaml/AllTests.php +++ b/framework/Yaml/test/Horde/Yaml/AllTests.php @@ -34,9 +34,9 @@ class Horde_Yaml_AllTests { error_reporting(E_ALL | E_STRICT); // Set up autoload - set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path()); + set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path()); if (!spl_autoload_functions()) { - spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);')); + spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'\\\\\', \'_\'), \'/\', $class); include "$filename.php";')); } // Test helpers