zoe             Sun Jun 21 20:29:12 2009 UTC

  Modified files:              
    /phpruntests/src    rtUtil.php 
  Log:
  fixing Olivier's out of memory problem
  
http://cvs.php.net/viewvc.cgi/phpruntests/src/rtUtil.php?r1=1.3&r2=1.4&diff_format=u
Index: phpruntests/src/rtUtil.php
diff -u phpruntests/src/rtUtil.php:1.3 phpruntests/src/rtUtil.php:1.4
--- phpruntests/src/rtUtil.php:1.3      Mon May 25 12:39:46 2009
+++ phpruntests/src/rtUtil.php  Sun Jun 21 20:29:12 2009
@@ -3,7 +3,7 @@
  * rtUtil
  *
  * Static utility methods
- * 
+ *
  * @category  Testing
  * @package   RUNTESTS
  * @author    Zoe Slattery <z...@php.net>
@@ -17,11 +17,7 @@
     public static function getTestList($aDirectory)
     {
         $result = array();
-
-        foreach (new rtPhptFilterIterator(new RecursiveIteratorIterator(new 
RecursiveDirectoryIterator($aDirectory))) as $item) {
-            $result[] = $item->getPathname();
-        }
-
+        $result = glob($aDirectory. "/*.phpt");      
         return $result;
     }
 
@@ -35,13 +31,22 @@
      */
     public static function getDirectoryList($aDirectory)
     {
-        $result = array();
-
-        foreach (new rtPhptFilterIterator(new RecursiveIteratorIterator(new 
RecursiveDirectoryIterator($aDirectory))) as $directory) {
-            $result[] = $directory->getPath() . "/";
+        $subDirectories = array();
+        foreach (new RecursiveIteratorIterator(new 
RecursiveDirectoryIterator($aDirectory)) as $directory) {
+            $subDirectories[] = $directory->getPath() . "/";
         }
-
-        return array_unique($result);
+        
+        $subDirectoriesUnique = array_unique($subDirectories);
+        
+        $phptDirectories = array();
+        
+        foreach ($subDirectoriesUnique as $subDir) {
+            if(count(self::getTestList($subDir)) > 0) {
+                $phptDirectories[] = $subDir;
+            }
+        }
+        
+        return $phptDirectories;
     }
 }
 ?>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to