diff options
author | Florian Pritz <bluewind@xinu.at> | 2021-02-21 11:08:30 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2021-02-21 11:08:30 +0100 |
commit | 29e6c8ad462a426f4bc6d380646e434e3361a21d (patch) | |
tree | 121e7ec9a5aa926a7cfffc40f33fdc156fac4d76 /public_html | |
parent | 78b9b272de889809bf05529bf91cc94829a5f9e6 (diff) |
PHP8: Update code coverage plugin for compabtibility
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'public_html')
-rw-r--r-- | public_html/index.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/public_html/index.php b/public_html/index.php index aa9e12ec4..930737eb1 100644 --- a/public_html/index.php +++ b/public_html/index.php @@ -359,11 +359,11 @@ if (getenv("ENVIRONMENT") === "testsuite" && getenv("COLLECT_COVERAGE") == 1) { if ($testname) { include APPPATH."../vendor/autoload.php"; $filter = new \SebastianBergmann\CodeCoverage\Filter(); - $filter->addDirectoryToWhitelist(APPPATH); - $filter->removeDirectoryFromWhitelist(APPPATH."/third_party/"); + $filter->includeDirectory(APPPATH); + $filter->excludeDirectory(APPPATH."/third_party/"); // Force phpdbg for speed //$driver = new \SebastianBergmann\CodeCoverage\Driver\PHPDBG(); - $driver = null; + $driver = (new \SebastianBergmann\CodeCoverage\Driver\Selector)->forLineCoverage($filter); $coverage = new \SebastianBergmann\CodeCoverage\CodeCoverage($driver, $filter); $coverage->start($testname); } |