From bca933fdda78b9211b144236755530d1bf59d4e0 Mon Sep 17 00:00:00 2001 From: Andrew Shell Date: Sat, 28 Mar 2026 11:19:29 -0500 Subject: [PATCH] Adding support for phpunit code coverage reports --- package.json | 5 ++++- phpunit.xml.dist | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6bdfd70..9ff2f49 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,9 @@ "test:unit:php:setup:debug": "wp-env --config .wp-env.test.json start --xdebug", "test:unit:php:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose --testdox", "test:unit:php": "npm-run-all test:unit:php:setup test:unit:php:base", - "test:unit:php:debug": "npm-run-all test:unit:php:setup:debug test:unit:php:base" + "test:unit:php:debug": "npm-run-all test:unit:php:setup:debug test:unit:php:base", + "test:unit:php:setup:coverage": "wp-env --config .wp-env.test.json start --xdebug=coverage", + "test:unit:php:coverage:base": "wp-env --config .wp-env.test.json run --env-cwd='wp-content/plugins/rsscloud' wordpress vendor/bin/phpunit -c phpunit.xml.dist --verbose --coverage-html coverage --coverage-clover coverage/clover.xml", + "test:unit:php:coverage": "npm-run-all test:unit:php:setup:coverage test:unit:php:coverage:base" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1653967..b4f05d5 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -14,4 +14,14 @@ ./tests/test-sample.php + + + . + + + ./tests + ./vendor + ./node_modules + +