Changed name from requestAction() to testAction()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4876 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mariano.iglesias 2007-04-18 00:34:38 +00:00
parent c290e10dd3
commit 4b7e496446

View file

@ -111,10 +111,10 @@ class CakeTestCase extends UnitTestCase {
} }
/** /**
* Callback issued when a controller's action is about to be invoked through requestAction(). * Callback issued when a controller's action is about to be invoked through testAction().
* *
* @param Controller $controller Controller that's about to be invoked. * @param Controller $controller Controller that's about to be invoked.
* @param array $params Additional parameters as sent by requestAction(). * @param array $params Additional parameters as sent by testAction().
*/ */
function startController(&$controller, $params = array()) { function startController(&$controller, $params = array()) {
if (isset($params['fixturize']) && ((is_array($params['fixturize']) && !empty($params['fixturize'])) || $params['fixturize'] === true)) { if (isset($params['fixturize']) && ((is_array($params['fixturize']) && !empty($params['fixturize'])) || $params['fixturize'] === true)) {
@ -191,10 +191,10 @@ class CakeTestCase extends UnitTestCase {
} }
} }
/** /**
* Callback issued when a controller's action has been invoked through requestAction(). * Callback issued when a controller's action has been invoked through testAction().
* *
* @param Controller $controller Controller that has been invoked. * @param Controller $controller Controller that has been invoked.
* * @param array $params Additional parameters as sent by requestAction(). * * @param array $params Additional parameters as sent by testAction().
*/ */
function endController(&$controller, $params = array()) { function endController(&$controller, $params = array()) {
if (isset($this->db) && isset($this->_queries) && !empty($this->_queries) && !empty($this->_queries['drop'])) { if (isset($this->db) && isset($this->_queries) && !empty($this->_queries) && !empty($this->_queries['drop'])) {
@ -216,7 +216,7 @@ class CakeTestCase extends UnitTestCase {
* *
* @access protected * @access protected
*/ */
function requestAction($url, $params = array()) { function testAction($url, $params = array()) {
$default = array( $default = array(
'return' => 'result', 'return' => 'result',
'fixturize' => false, 'fixturize' => false,
@ -392,7 +392,13 @@ class CakeTestCase extends UnitTestCase {
* @access public * @access public
*/ */
function getTests() { function getTests() {
$methods = am(am(array('start', 'startCase'), parent::getTests()), array('endCase', 'end')); $methods = parent::getTests();
$index = array_search('testAction', $methods);
if ($index !== false) {
unset($methods[$index]);
}
$methods = am(am(array('start', 'startCase'), $methods), array('endCase', 'end'));
return $methods; return $methods;
} }