Adding Code Coverage

install in ubuntu

sudo apt-get install php-xdebug

install in mac

pecl install xdebug

phpunit.xml add this

<logging>
    <log type="coverage-html" target="./report" charset="UTF-8"
        yui="true" highlight="true"
        lowUpperBound="50" highLowerBound="80" />
</logging>

to run it

vendor/bin/phpunit

trouble

No code coverage driver is available
-> dont forget to install php-xdebug

Subscribe to You Live What You Learn

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe