PHP code example of wallend / newman-php-coverager
1. Go to this page and download the library: Download wallend/newman-php-coverager library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wallend / newman-php-coverager example snippets
composer
" "wallend/newman-php-coverager": "dev-master"
}
newmanPhpCoverager\Coverage;
Environment::init();
$coverage = new Coverage();
#Generate HTML reports
php ./vendor/wallend/newman-php-coverager/phpnewman --collect-reports merge ../phpnewman --html /path/to/html/report
#Generate clover reports
php ./vendor/wallend/newman-php-coverager/phpnewman --collect-reports merge /tmp/coverage --clover /tmp/clover.xml