Skip to content

Commit 0228611

Browse files
committed
Fixing remaining failing tests on FormHelperTest case
1 parent a5851e9 commit 0228611

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/Cake/Test/Case/View/Helper/FormHelperTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7138,7 +7138,8 @@ public function testMultiRecordForm() {
71387138
);
71397139
$this->assertTags($result, $expected);
71407140

7141-
$this->Form->validationErrors['ValidateProfile'][1]['ValidateItem'][2]['profile_id'] = 'Error';
7141+
$ValidateProfile = ClassRegistry::getObject('ValidateProfile');
7142+
$ValidateProfile->validationErrors[1]['ValidateItem'][2]['profile_id'] = 'Error';
71427143
$this->Form->request->data['ValidateProfile'][1]['ValidateItem'][2]['profile_id'] = '1';
71437144
$result = $this->Form->input('ValidateProfile.1.ValidateItem.2.profile_id');
71447145
$expected = array(
@@ -7167,11 +7168,12 @@ public function testMultiRecordForm() {
71677168
*/
71687169
public function testMultiRecordFormValidationErrors() {
71697170
$this->Form->create('ValidateProfile');
7170-
$this->Form->validationErrors['ValidateProfile'][2]['ValidateItem'][1]['name'] = array('Error in field name');
7171+
$ValidateProfile = ClassRegistry::getObject('ValidateProfile');
7172+
$ValidateProfile->validationErrors[2]['ValidateItem'][1]['name'] = array('Error in field name');
71717173
$result = $this->Form->error('ValidateProfile.2.ValidateItem.1.name');
71727174
$this->assertTags($result, array('div' => array('class' => 'error-message'), 'Error in field name', '/div'));
71737175

7174-
$this->Form->validationErrors['ValidateProfile'][2]['city'] = array('Error in field city');
7176+
$ValidateProfile->validationErrors[2]['city'] = array('Error in field city');
71757177
$result = $this->Form->error('ValidateProfile.2.city');
71767178
$this->assertTags($result, array('div' => array('class' => 'error-message'), 'Error in field city', '/div'));
71777179

0 commit comments

Comments
 (0)