cvs: pear-core /PEAR/Command Test.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Sat, 04 Apr 2009 00:06:17 +0000 |
| Subject: | cvs: pear-core /PEAR/Command Test.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-8299@lists.php.net to get a copy of this message | ||
dufuz Sat Apr 4 00:06:17 2009 UTC
Modified files:
/pear-core/PEAR/Command Test.php
Log:
Reduce duplication
http://cvs.php.net/viewvc.cgi/pear-core/PEAR/Command/Test.php?r1=1.31&r2=1.32&diff_format=u
Index: pear-core/PEAR/Command/Test.php
diff -u pear-core/PEAR/Command/Test.php:1.31 pear-core/PEAR/Command/Test.php:1.32
--- pear-core/PEAR/Command/Test.php:1.31 Sat Apr 4 00:00:29 2009
+++ pear-core/PEAR/Command/Test.php Sat Apr 4 00:06:17 2009
@@ -11,7 +11,7 @@
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2009 The Authors
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: Test.php,v 1.31 2009/04/04 00:00:29 dufuz Exp $
+ * @version CVS: $Id: Test.php,v 1.32 2009/04/04 00:06:17 dufuz Exp $
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
@@ -175,12 +175,6 @@
}
$args = array($p, '-type', 'f', '-name',
'*.phpt');
- if (!isset($options['recur'])) {
- $args[] = '-maxdepth';
- $args[] = 1;
- }
- $dir = System::find($args);
- $tests = array_merge($tests, $dir);
} else {
if (isset($options['phpunit'])) {
if (preg_match('/AllTests\.php\\z/i', $p)) {
@@ -203,15 +197,16 @@
$p .= '.phpt';
}
-
$args = array(dirname($p), '-type', 'f', '-name',
$p);
- if (!isset($options['recur'])) {
- $args[] = '-maxdepth';
- $args[] = 1;
- }
- $dir = System::find($args);
- $tests = array_merge($tests, $dir);
}
+
+ if (!isset($options['recur'])) {
+ $args[] = '-maxdepth';
+ $args[] = 1;
+ }
+
+ $dir = System::find($args);
+ $tests = array_merge($tests, $dir);
}
$ini_settings = '';