blob: cdb49ab5141ba2a5dc5cf4475e92fd4229a4e290 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?php
/**
* This is project's console commands configuration for Robo task runner.
*
* @see http://robo.li/
*/
class RoboFile extends \Robo\Tasks
{
public function test () {
// $coverage = new PHP_CodeCoverage();
// $coverage->start('PHP-SDK Unit Tests');
// $this->taskPHPUnit('./test/unit/')->run();
$res = $this->taskExec('phpunit --coverage-html test/output/report --bootstrap ./vendor/autoload.php ./test/unit')->run();
// print message when tests passed
if ($res->wasSuccessful()) $this->say("All tests passed");
// alternatively
if ($res()) $this->say("All tests passed");
// $coverage->stop();
// $writer = new PHP_CodeCoverage_Report_HTML;
// $writer->process($coverage, 'test/output/report');
return $res();
}
}
|