Adding PHPUnit tests
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 23 Apr 2006 23:34:18 +0000 (23:34 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 23 Apr 2006 23:34:18 +0000 (23:34 +0000)
docs/phpunit/AllTests.php [new file with mode: 0644]
docs/phpunit/ApplicationController.php [new file with mode: 0644]

diff --git a/docs/phpunit/AllTests.php b/docs/phpunit/AllTests.php
new file mode 100644 (file)
index 0000000..54b0bae
--- /dev/null
@@ -0,0 +1,18 @@
+<?php
+
+// load the test harness
+require_once('PHPUnit2/Framework/TestSuite.php');
+require_once('PHPUnit2/TextUI/TestRunner.php');
+require_once('PHPUnit2/Framework/Warning.php');
+require_once('PHPUnit2/Framework/IncompleteTestError.php');
+
+// setup the new test suite
+$suite = new PHPUnit2_Framework_TestSuite;
+
+// load tests
+$suite->addTestFile('ApplicationController.php');
+
+// run all the tests
+PHPUnit2_TextUI_TestRunner::run($suite);
+
+?>
\ No newline at end of file
diff --git a/docs/phpunit/ApplicationController.php b/docs/phpunit/ApplicationController.php
new file mode 100644 (file)
index 0000000..902a52f
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+require_once('PHPUnit2/Framework/TestCase.php');
+
+class ApplicationControllerTest extends PHPUnit2_Framework_TestCase
+{
+       protected $fixture;
+       
+       public function setUp()
+       {
+               $this->fixture = array();       
+       }
+       
+       public function testNewArrayIsEmpty()
+       {
+               throw new PHPUnit2_Framework_IncompleteTestError;
+       }
+}
+
+?>
\ No newline at end of file