|
@ -50,6 +50,21 @@ class RoboFile extends \Robo\Tasks { |
|
|
* recommended if debugging facilities are not otherwise needed. |
|
|
* recommended if debugging facilities are not otherwise needed. |
|
|
*/ |
|
|
*/ |
|
|
public function coverage(array $args): Result { |
|
|
public function coverage(array $args): Result { |
|
|
|
|
|
// run tests with code coverage reporting enabled |
|
|
|
|
|
$exec = $this->findCoverageEngine(); |
|
|
|
|
|
return $this->runTests($exec, "coverage", array_merge(["--coverage-html", self::BASE_TEST."coverage"], $args)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Produces a code coverage report, with redundant tests |
|
|
|
|
|
* |
|
|
|
|
|
* Depending on the environment, some tests that normally provide |
|
|
|
|
|
* coverage may be skipped, while working alternatives are normally |
|
|
|
|
|
* suppressed for reasons of time. This coverage report will try to |
|
|
|
|
|
* run all tests which may cover code. |
|
|
|
|
|
* |
|
|
|
|
|
* See also help for the "coverage" task for more details. |
|
|
|
|
|
*/ |
|
|
|
|
|
public function coverageFull(array $args): Result { |
|
|
// run tests with code coverage reporting enabled |
|
|
// run tests with code coverage reporting enabled |
|
|
$exec = $this->findCoverageEngine(); |
|
|
$exec = $this->findCoverageEngine(); |
|
|
return $this->runTests($exec, "typical", array_merge(["--coverage-html", self::BASE_TEST."coverage"], $args)); |
|
|
return $this->runTests($exec, "typical", array_merge(["--coverage-html", self::BASE_TEST."coverage"], $args)); |
|
@ -88,6 +103,9 @@ class RoboFile extends \Robo\Tasks { |
|
|
case "quick": |
|
|
case "quick": |
|
|
$set = ["--exclude-group", "optional,slow"]; |
|
|
$set = ["--exclude-group", "optional,slow"]; |
|
|
break; |
|
|
break; |
|
|
|
|
|
case "coverage": |
|
|
|
|
|
$set = ["--exclude-group", "optional,excludeFromCoverage"]; |
|
|
|
|
|
break; |
|
|
case "full": |
|
|
case "full": |
|
|
$set = []; |
|
|
$set = []; |
|
|
break; |
|
|
break; |
|
|