Allow to skip broken tests.
authorJan Schneider <jan@horde.org>
Thu, 18 Mar 2010 18:21:08 +0000 (19:21 +0100)
committerJan Schneider <jan@horde.org>
Thu, 18 Mar 2010 18:21:08 +0000 (19:21 +0100)
framework/Test/lib/Horde/Test/AllTests.php

index c2baff7..a365744 100644 (file)
@@ -86,11 +86,11 @@ class Horde_Test_AllTests
         foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($basedir)) as $file) {
             if ($file->isFile() && preg_match('/Test.php$/', $file->getFilename())) {
                 $pathname = $file->getPathname();
-                require $pathname;
-
-                $class = str_replace(DIRECTORY_SEPARATOR, '_',
-                                     preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
-                $suite->addTestSuite(self::$_package . '_' . $class);
+                if (require $pathname) {
+                    $class = str_replace(DIRECTORY_SEPARATOR, '_',
+                                         preg_replace("/^$baseregexp(.*)\.php/", '\\1', $pathname));
+                    $suite->addTestSuite(self::$_package . '_' . $class);
+                }
             }
         }