Permalink
Browse files

check extension before passing to addTestFile()

  • Loading branch information...
1 parent 89959af commit a96e4397beb0dd5e28ac463b630ef1da9f0240e0 @rchavik rchavik committed with lorenzo May 10, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/Cake/Test/Case/Console/AllConsoleLibsTest.php
View
5 lib/Cake/Test/Case/Console/AllConsoleLibsTest.php
@@ -38,7 +38,10 @@ public static function suite() {
if (!$file->isFile() || strpos($file, 'All') === 0) {
continue;
}
- $suite->addTestFile($file->getRealPath());
+ $fileName = $file->getRealPath();
+ if (substr($fileName, -4) === '.php') {
+ $suite->addTestFile($file->getRealPath());
+ }
}
return $suite;
}

0 comments on commit a96e439

Please sign in to comment.