diff options
Diffstat (limited to 'tests/system/controllerTest.php')
-rw-r--r-- | tests/system/controllerTest.php | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/tests/system/controllerTest.php b/tests/system/controllerTest.php index 1a83f97..209ef06 100644 --- a/tests/system/controllerTest.php +++ b/tests/system/controllerTest.php @@ -1,42 +1,44 @@ <?php + require_once('/../../system/classes/response.php'); require_once('/../../system/classes/controller.php'); require_once('mocks/testController.php'); + /** * Generated by PHPUnit_SkeletonGenerator on 2013-02-05 at 16:39:57. */ class ControllerTest extends PHPUnit_Framework_TestCase { - /** - * @var Controller - */ - protected $object; - /** - * Sets up the fixture, for example, opens a network connection. - * This method is called before a test is executed. - */ - protected function setUp() - { - $this->object = new Test_Controller; - } + /** + * @var Controller + */ + protected $object; - - public function testRun() - { - $this->object->run('index'); - $this->assertEquals($this->object->counter,3); - } - + /** + * Sets up the fixture, for example, opens a network connection. + * This method is called before a test is executed. + */ + protected function setUp() + { + $this->object = new Test_Controller; + } + + public function testRun() + { + $this->object->run('index'); + $this->assertEquals($this->object->counter, 3); + } public function testException() - { - $except=false; - try{ + { + $except = false; + try { $this->object->run('bogus'); - }catch(Exception $e){ - $except=true; + } catch (Exception $e) { + $except = true; } - $this->assertEquals($except,true); - } + $this->assertEquals($except, true); + } + } |