Add a filter to unit tests. Now you can do 'php index.php Album_Helper_Test Photo_Helper_Test' to just run those two

This commit is contained in:
Bharat Mediratta
2008-12-03 06:00:30 +00:00
parent f114814c03
commit 53664787d4
2 changed files with 5 additions and 1 deletions

View File

@@ -64,6 +64,10 @@ class Unit_Test_Core {
// The class name should be the same as the file name
$class = substr($path, strrpos($path, '/') + 1, -(strlen(EXT)));
if (count($_SERVER['argv']) > 2 && !in_array($class, $_SERVER['argv'])) {
continue;
}
// Skip hidden files
if (substr($class, 0, 1) === '.')
continue;