Fixing failing tests in ObjectTest.

This commit is contained in:
mark_story 2011-04-22 08:16:13 -04:00
parent dbb3149c08
commit fd55066dd9

View file

@ -683,9 +683,9 @@ class ObjectTest extends CakeTestCase {
*/ */
function testRequestAction() { function testRequestAction() {
App::build(array( App::build(array(
'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS),
'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View' . DS),
'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS) 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Controller' . DS)
)); ));
$result = $this->object->requestAction(''); $result = $this->object->requestAction('');
$this->assertFalse($result); $this->assertFalse($result);
@ -763,9 +763,9 @@ class ObjectTest extends CakeTestCase {
*/ */
function testRequestActionArray() { function testRequestActionArray() {
App::build(array( App::build(array(
'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'models' . DS), 'models' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Model' . DS),
'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS), 'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'View' . DS),
'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'controllers' . DS) 'controllers' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'Controller' . DS)
)); ));
$result = $this->object->requestAction( $result = $this->object->requestAction(
@ -819,8 +819,7 @@ class ObjectTest extends CakeTestCase {
*/ */
function testRequestActionParamParseAndPass() { function testRequestActionParamParseAndPass() {
$result = $this->object->requestAction('/request_action/params_pass'); $result = $this->object->requestAction('/request_action/params_pass');
$this->assertTrue(isset($result['url']['url'])); $this->assertEqual($result->url, 'request_action/params_pass');
$this->assertEqual($result['url']['url'], 'request_action/params_pass');
$this->assertEqual($result['controller'], 'request_action'); $this->assertEqual($result['controller'], 'request_action');
$this->assertEqual($result['action'], 'params_pass'); $this->assertEqual($result['action'], 'params_pass');
$this->assertEqual($result['form'], array()); $this->assertEqual($result['form'], array());