Install extension using composer:
{
"require-dev": {
"atoum/reports-extension": "~1.0"
}
}
Enable the extension using atoum configuration file:
<?php
// .atoum.php
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
use mageekguy\atoum\reports;
$runner->addExtension(new reports\extension($script));
Check out the demo report generated with atoum's test suite: http://atoum.github.io/reports-extension/
Add the following code to you configuration file :
<?php
// .atoum.php
use mageekguy\atoum\reports;
use mageekguy\atoum\reports\coverage;
$script->addDefaultReport();
$coverage = new coverage\html();
$coverage->addWriter(new \mageekguy\atoum\writers\std\out());
$coverage->setOutPutDirectory(__DIR__ . '/coverage');
$runner->addReport($coverage);
If you want to generate branches and paths reports, you will have to install xDebug 2.3.0 or later:
wget https://github.com/FriendsOfPHP/pickle/releases/download/v0.4.0/pickle.phar
php pickle.phar install xdebug
php -v
Once done, just use the -ebpc
command line flag or add the following line of code to your configuration file:
<?php
// .atoum.php
$script->enableBranchAndPAthCoverage();