summaryrefslogtreecommitdiffstats
path: root/RoboFile.php
diff options
context:
space:
mode:
authornornholdj <nornholdj@gmail.com>2014-10-22 14:17:50 -0400
committernornholdj <nornholdj@gmail.com>2014-10-22 14:17:50 -0400
commitd9d40f3ce24068d5a0d0fecb4aa9cffcf15c5555 (patch)
tree647689c543d74b2d2cda0ed96f298f0df50f0c1e /RoboFile.php
parent7a503d6b918832568ff751368aae7be797d47aa1 (diff)
downloadphp-sparkpost-d9d40f3ce24068d5a0d0fecb4aa9cffcf15c5555.zip
php-sparkpost-d9d40f3ce24068d5a0d0fecb4aa9cffcf15c5555.tar.gz
php-sparkpost-d9d40f3ce24068d5a0d0fecb4aa9cffcf15c5555.tar.bz2
MA-946 #time 6h finished adding node-sdk function parity. Started on unit tests and setup test code coverage.
Diffstat (limited to 'RoboFile.php')
-rw-r--r--RoboFile.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/RoboFile.php b/RoboFile.php
new file mode 100644
index 0000000..cdb49ab
--- /dev/null
+++ b/RoboFile.php
@@ -0,0 +1,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();
+ }
+} \ No newline at end of file