Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixing remaining failing tests on FormHelperTest case

  • Loading branch information...
commit 02286119691c82d9aae3e56f680bef2e2f16a86b 1 parent a5851e9
@lorenzo lorenzo authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/Cake/Test/Case/View/Helper/FormHelperTest.php
View
8 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'));
Please sign in to comment.
Something went wrong with that request. Please try again.