summaryrefslogtreecommitdiff
path: root/modules/unit_test/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-01 07:55:48 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-01 07:55:48 +0000
commitf8b4c669063b49acd658b1d85194632b57350e68 (patch)
tree5fe90ad082bea167d8fefb9a0ce4b05363063cea /modules/unit_test/controllers
parent146f34dc07c7c47505d8a6e4bdf9e535fcddfbb5 (diff)
Set up unit test framework. Tweak configuration so that it only runs in
command line mode, and expects to put data into test/var. Create a module to wrap it that generates a nice text-only view of the output.
Diffstat (limited to 'modules/unit_test/controllers')
-rw-r--r--modules/unit_test/controllers/unit_test.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/unit_test/controllers/unit_test.php b/modules/unit_test/controllers/unit_test.php
new file mode 100644
index 00000000..1481d9ff
--- /dev/null
+++ b/modules/unit_test/controllers/unit_test.php
@@ -0,0 +1,22 @@
+<?php defined('SYSPATH') or die('No direct script access.');
+/**
+ * Unit_Test controller.
+ *
+ * $Id$
+ *
+ * @package Unit_Test
+ * @author Kohana Team
+ * @copyright (c) 2007-2008 Kohana Team
+ * @license http://kohanaphp.com/license.html
+ */
+class Unit_test_Controller extends Controller {
+
+ const ALLOW_PRODUCTION = FALSE;
+
+ public function index()
+ {
+ // Run tests and show results!
+ echo new Unit_Test;
+ }
+
+} \ No newline at end of file