Permalink
Browse files

MINOR: exclude functional tests when running just framework module tests

  • Loading branch information...
wilr authored and chillu committed Jun 19, 2012
1 parent 3eff92a commit eb2a0427cce98d702b3fec38bb9706221dfffc2f
Showing with 6 additions and 3 deletions.
  1. +6 −3 dev/TestRunner.php
View
@@ -129,7 +129,7 @@ function all($request, $coverage = false) {
$reflection = new ReflectionClass($class);
if(!$reflection->isInstantiable()) unset($tests[$class]);
}
$this->runTests($tests, $coverage);
}
@@ -236,18 +236,21 @@ function module($request, $coverage = false) {
$classNames = array();
$moduleNames = explode(',', $request->param('ModuleName'));
$ignored = array('functionaltest', 'phpsyntaxtest');
foreach($moduleNames as $moduleName) {
$classesForModule = ClassInfo::classes_for_folder($moduleName);
if($classesForModule) {
foreach($classesForModule as $className) {
if(class_exists($className) && is_subclass_of($className, 'SapphireTest')) {
$classNames[] = $className;
if(!in_array($className, $ignored))
$classNames[] = $className;
}
}
}
}
$this->runTests($classNames, $coverage);
}

0 comments on commit eb2a042

Please sign in to comment.