Created
May 4, 2012 20:37
-
-
Save veganista/2597579 to your computer and use it in GitHub Desktop.
CakePHP Controller Tetsing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Users Test cases generated on: 2012-03-13 19:59:39 : 1331668779*/ | |
App::uses('UsersController', 'Controller'); | |
/** | |
* TestUsersController * | |
*/ | |
class TestUsersController extends UsersController { | |
/** | |
* Auto render | |
* | |
* @var boolean | |
*/ | |
public $autoRender = false; | |
/** | |
* Redirect action | |
* | |
* @param mixed $url | |
* @param mixed $status | |
* @param boolean $exit | |
* @return void | |
*/ | |
public function redirect($url, $status = null, $exit = true) { | |
$this->redirectUrl = $url; | |
} | |
} | |
/** | |
* UsersController Test Case | |
* | |
*/ | |
class UsersControllerTestCase extends ControllerTestCase { | |
/** | |
* Fixtures | |
* | |
* @var array | |
*/ | |
public $fixtures = array('app.user', 'app.group'); | |
/** | |
* setUp method | |
* | |
* @return void | |
*/ | |
public function setUp() { | |
parent::setUp(); | |
$this->Users = new TestUsersController(); | |
} | |
/** | |
* tearDown method | |
* | |
* @return void | |
*/ | |
public function tearDown() { | |
unset($this->Users); | |
parent::tearDown(); | |
} | |
/** | |
* testAdminIndex method | |
* | |
* @return void | |
*/ | |
public function testAdminIndex() { | |
$result = $this->testAction('admin/users/index'); | |
debug($result); | |
} | |
/** | |
* testAdminView method | |
* | |
* @return void | |
*/ | |
public function testAdminView() { | |
} | |
/** | |
* testAdminAdd method | |
* | |
* @return void | |
*/ | |
public function testAdminAdd() { | |
} | |
/** | |
* testAdminEdit method | |
* | |
* @return void | |
*/ | |
public function testAdminEdit() { | |
} | |
/** | |
* testAdminDelete method | |
* | |
* @return void | |
*/ | |
public function testAdminDelete() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More of the error: