summaryrefslogtreecommitdiffstats
path: root/tests/system/controllerTest.php
blob: 1a83f9727fd437a4dfc7eb9424c1d0b80934b311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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;
    }

   
    public function testRun()
    {
        $this->object->run('index');
		$this->assertEquals($this->object->counter,3);
    }
	

	public function testException()
    {	
		$except=false;
		try{
			$this->object->run('bogus');
		}catch(Exception $e){
			$except=true;	
		}
		$this->assertEquals($except,true);
    }
}