|
@@ 131-146 (lines=16) @@
|
| 128 |
|
* Run test classes that should be run with every commit. |
| 129 |
|
* Currently excludes PhpSyntaxTest |
| 130 |
|
*/ |
| 131 |
|
public function all($request, $coverage = false) { |
| 132 |
|
self::use_test_manifest(); |
| 133 |
|
$tests = ClassInfo::subclassesFor('SapphireTest'); |
| 134 |
|
array_shift($tests); |
| 135 |
|
unset($tests['FunctionalTest']); |
| 136 |
|
|
| 137 |
|
// Remove tests that don't need to be executed every time |
| 138 |
|
unset($tests['PhpSyntaxTest']); |
| 139 |
|
|
| 140 |
|
foreach($tests as $class => $v) { |
| 141 |
|
$reflection = new ReflectionClass($class); |
| 142 |
|
if(!$reflection->isInstantiable()) unset($tests[$class]); |
| 143 |
|
} |
| 144 |
|
|
| 145 |
|
$this->runTests($tests, $coverage); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
/** |
| 149 |
|
* Run test classes that should be run before build - i.e., everything possible. |
|
@@ 151-162 (lines=12) @@
|
| 148 |
|
/** |
| 149 |
|
* Run test classes that should be run before build - i.e., everything possible. |
| 150 |
|
*/ |
| 151 |
|
public function build() { |
| 152 |
|
self::use_test_manifest(); |
| 153 |
|
$tests = ClassInfo::subclassesFor('SapphireTest'); |
| 154 |
|
array_shift($tests); |
| 155 |
|
unset($tests['FunctionalTest']); |
| 156 |
|
foreach($tests as $class => $v) { |
| 157 |
|
$reflection = new ReflectionClass($class); |
| 158 |
|
if(!$reflection->isInstantiable()) unset($tests[$class]); |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
$this->runTests($tests); |
| 162 |
|
} |
| 163 |
|
|
| 164 |
|
/** |
| 165 |
|
* Browse all enabled test cases in the environment |