summaryrefslogtreecommitdiff
path: root/modules/unit_test/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'modules/unit_test/libraries')
-rw-r--r--modules/unit_test/libraries/Unit_Test.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/unit_test/libraries/Unit_Test.php b/modules/unit_test/libraries/Unit_Test.php
index cf8b85f0..debf53ab 100644
--- a/modules/unit_test/libraries/Unit_Test.php
+++ b/modules/unit_test/libraries/Unit_Test.php
@@ -211,13 +211,21 @@ class Unit_Test_Core {
// Hide passed tests from the report?
$hide_passed = (bool) (($hide_passed !== NULL) ? $hide_passed : Kohana::config('unit_test.hide_passed', FALSE, FALSE));
-
+
+
+ if (PHP_SAPI == 'cli')
+ {
+ $report = View::factory('kohana_unit_test_cli');
+ }
+ else
+ {
+ $report = View::factory('kohana_unit_test');
+ }
// Render unit_test report
- return View::factory('kohana_unit_test')
- ->set('results', $this->results)
- ->set('stats', $this->stats)
- ->set('hide_passed', $hide_passed)
- ->render();
+ return $report->set('results', $this->results)
+ ->set('stats', $this->stats)
+ ->set('hide_passed', $hide_passed)
+ ->render();
}
/**