check extension before passing to addTestFile()

This commit is contained in:
Rachman Chavik 2012-05-10 19:03:12 +07:00
parent 5b67534acc
commit 2598d17670

View file

@ -38,7 +38,10 @@ class AllConsoleLibsTest extends PHPUnit_Framework_TestSuite {
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;
}