MDL-72701 unit tests: Generate default coverage

This commit is contained in:
Andrew Nicols
2021-12-21 09:24:00 +08:00
parent bb9741d472
commit 3a70983d53
16 changed files with 29 additions and 561 deletions
+2 -2
View File
@@ -973,7 +973,7 @@ class phpunit_util extends testing_util {
* @param string $fulldir The directory to find the coverage info file in.
* @return phpunit_coverage_info
*/
protected static function get_coverage_info(string $fulldir): ?phpunit_coverage_info {
protected static function get_coverage_info(string $fulldir): phpunit_coverage_info {
$coverageconfig = "{$fulldir}/tests/coverage.php";
if (file_exists($coverageconfig)) {
$coverageinfo = require($coverageconfig);
@@ -984,7 +984,7 @@ class phpunit_util extends testing_util {
return $coverageinfo;
}
return null;
return new phpunit_coverage_info();;
}
/**