Fix silent failures.

Fixes #3133
This commit is contained in:
mark_story 2012-08-20 16:19:34 -04:00
parent e75fdd21ee
commit 00f3e7e441

View file

@ -181,12 +181,14 @@ abstract class ControllerTestCase extends CakeTestCase {
* *
* @param string $name The name of the function * @param string $name The name of the function
* @param array $arguments Array of arguments * @param array $arguments Array of arguments
* @return Function * @return the return of _testAction
* @throws BadMethodCallException when you call methods that don't exist.
*/ */
public function __call($name, $arguments) { public function __call($name, $arguments) {
if ($name == 'testAction') { if ($name == 'testAction') {
return call_user_func_array(array($this, '_testAction'), $arguments); return call_user_func_array(array($this, '_testAction'), $arguments);
} }
throw new BadMethodCallException("Method '{$name}' does not exist.");
} }
/** /**