From 02286119691c82d9aae3e56f680bef2e2f16a86b Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 14 Jul 2011 13:56:31 -0430 Subject: [PATCH] Fixing remaining failing tests on FormHelperTest case --- lib/Cake/Test/Case/View/Helper/FormHelperTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index c013edc1402..7a148a2a7dc 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -7138,7 +7138,8 @@ public function testMultiRecordForm() { ); $this->assertTags($result, $expected); - $this->Form->validationErrors['ValidateProfile'][1]['ValidateItem'][2]['profile_id'] = 'Error'; + $ValidateProfile = ClassRegistry::getObject('ValidateProfile'); + $ValidateProfile->validationErrors[1]['ValidateItem'][2]['profile_id'] = 'Error'; $this->Form->request->data['ValidateProfile'][1]['ValidateItem'][2]['profile_id'] = '1'; $result = $this->Form->input('ValidateProfile.1.ValidateItem.2.profile_id'); $expected = array( @@ -7167,11 +7168,12 @@ public function testMultiRecordForm() { */ public function testMultiRecordFormValidationErrors() { $this->Form->create('ValidateProfile'); - $this->Form->validationErrors['ValidateProfile'][2]['ValidateItem'][1]['name'] = array('Error in field name'); + $ValidateProfile = ClassRegistry::getObject('ValidateProfile'); + $ValidateProfile->validationErrors[2]['ValidateItem'][1]['name'] = array('Error in field name'); $result = $this->Form->error('ValidateProfile.2.ValidateItem.1.name'); $this->assertTags($result, array('div' => array('class' => 'error-message'), 'Error in field name', '/div')); - $this->Form->validationErrors['ValidateProfile'][2]['city'] = array('Error in field city'); + $ValidateProfile->validationErrors[2]['city'] = array('Error in field city'); $result = $this->Form->error('ValidateProfile.2.city'); $this->assertTags($result, array('div' => array('class' => 'error-message'), 'Error in field city', '/div'));