Esempio n. 1
0
<?php

if (!is_dir(__DIR__ . '/reports/code-coverage')) {
    mkdir(__DIR__ . '/reports/code-coverage');
}
/*
 * CLI report.
 */
$stdOutWriter = new \mageekguy\atoum\writers\std\out();
$cli = new \mageekguy\atoum\reports\realtime\cli();
$cli->addWriter($stdOutWriter);
/*
 * Xunit report
 */
$xunitWriter = new \mageekguy\atoum\writers\file(__DIR__ . '/reports/atoum.xml');
$xunit = new \mageekguy\atoum\reports\asynchronous\xunit();
$xunit->addWriter($xunitWriter);
/*
 * Clover xml coverage
 */
$cloverWriter = new \mageekguy\atoum\writers\file(__DIR__ . '/reports/coverage.xml');
$clover = new \mageekguy\atoum\reports\asynchronous\clover();
$clover->addWriter($cloverWriter);
$coverageField = new \mageekguy\atoum\report\fields\runner\coverage\html('PicORM', __DIR__ . '/reports/code-coverage');
$script->addDefaultReport()->addField($coverageField);
$runner->addReport($clover);
$runner->addReport($xunit);
$runner->addReport($cli);
Esempio n. 2
0
<?php

// build-tools/jenkins/atoum.ci.php
require_once __DIR__ . '/../../vendor/atoum/atoum/classes/autoloader.php';
/*
 * CLI report.
 */
$stdOutWriter = new \mageekguy\atoum\writers\std\out();
$cli = new \mageekguy\atoum\reports\realtime\cli();
$cli->addWriter($stdOutWriter);
$basedir = __DIR__ . '/../../';
/*
 * Xunit report
 */
$xunit = new \mageekguy\atoum\reports\asynchronous\xunit();
/*
 * Xunit writer
 */
$writer = new \mageekguy\atoum\writers\file($basedir . '/build/logs/junit.xml');
$xunit->addWriter($writer);
/*
 * Clover coverage
 */
$cloverWriter = new \mageekguy\atoum\writers\file($basedir . '/build/logs/clover.xml');
$cloverReport = new atoum\reports\asynchronous\clover();
$cloverReport->addWriter($cloverWriter);
/*
 * Html coverage
 */
$html = new \mageekguy\atoum\report\fields\runner\coverage\html('Solire\\Trieur', $basedir . '/build/coverage');
$cli->addField($html);