Permalink
Browse files

check extension before passing to addTestFile()

  • Loading branch information...
1 parent 5b67534 commit 2598d176702ca8ab934ca377cec369577d4a5213 @rchavik rchavik committed May 10, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 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 2598d17

Please sign in to comment.