These test suites need to not throw warnings when autoloading, so use the same
authorChuck Hagenbuch <chuck@horde.org>
Tue, 29 Sep 2009 17:31:05 +0000 (13:31 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 29 Sep 2009 17:31:05 +0000 (13:31 -0400)
logic we do in Horde_Autoloader. Also include PHPUnit/Framework.php.

framework/Db/test/Horde/Db/AllTests.php
framework/Injector/test/Horde/Injector/AllTests.php
framework/Yaml/test/Horde/Yaml/AllTests.php

index 52c5868..33a1dc3 100644 (file)
@@ -47,7 +47,7 @@ class Horde_Db_AllTests {
         // Set up include_path and autoloading
         set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
         if (!spl_autoload_functions()) {
-            spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); @include_once "$filename.php";'));
+            spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
         }
 
         // Build the suite
index 0bbbf87..666f507 100644 (file)
@@ -21,7 +21,7 @@ class Horde_Injector_AllTests
     public static function suite()
     {
         if (!spl_autoload_functions()) {
-            spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); @include_once "$filename.php";'));
+            spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
         }
         set_include_path(dirname(__FILE__) . '/../../../lib' . PATH_SEPARATOR . get_include_path());
 
index 2f2924a..e42149a 100644 (file)
@@ -13,7 +13,7 @@ if (!defined('PHPUnit_MAIN_METHOD')) {
     define('PHPUnit_MAIN_METHOD', 'Horde_Yaml_AllTests::main');
 }
 
-require_once 'PHPUnit/Framework/TestSuite.php';
+require_once 'PHPUnit/Framework.php';
 require_once 'PHPUnit/TextUI/TestRunner.php';
 
 /**
@@ -36,7 +36,7 @@ class Horde_Yaml_AllTests {
         // Set up autoload
         set_include_path(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . get_include_path());
         if (!spl_autoload_functions()) {
-            spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); @include_once "$filename.php";'));
+            spl_autoload_register(create_function('$class', '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class); $er = error_reporting(22525); include "$filename.php"; error_reporting($er);'));
         }
 
         // Test helpers