mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
8a806d7fc5
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@309 3807eeeb-6ff5-0310-8944-8be069107fe0
43 lines
No EOL
1,014 B
PHP
43 lines
No EOL
1,014 B
PHP
<?php
|
|
|
|
uses('controller');
|
|
|
|
class ControllerTest extends UnitTestCase
|
|
{
|
|
var $controller;
|
|
|
|
// constructor of the test suite
|
|
function ControllerTest()
|
|
{
|
|
$this->UnitTestCase('Controller test');
|
|
}
|
|
|
|
// called before the test functions will be executed
|
|
// this function is defined in PHPUnit_TestCase and overwritten
|
|
// here
|
|
function setUp()
|
|
{
|
|
$this->controller = new Controller();
|
|
$this->controller->base = '/ease';
|
|
|
|
$data = array('foo'=>'foo_value', 'foobar'=>'foobar_value', 'tofu'=>'1');
|
|
$params = array('controller'=>'Test', 'action'=>'test_action', 'data'=>$data);
|
|
$here = '/cake/test';
|
|
$this->controller->params = $params;
|
|
$this->controller->data = $data;
|
|
$this->controller->here = $here;
|
|
|
|
$this->controller->action = $this->controller->params['action'];
|
|
$this->controller->passed_args = null;
|
|
}
|
|
|
|
// called after the test functions are executed
|
|
// this function is defined in PHPUnit_TestCase and overwritten
|
|
// here
|
|
function tearDown()
|
|
{
|
|
unset($this->controller);
|
|
}
|
|
}
|
|
|
|
?>
|