Skip to content
Permalink
Browse files

Deleted another test that was duplicating an existing one

  • Loading branch information...
lorenzo committed Feb 27, 2014
1 parent cd9e2ca commit 2c352688b8f6c908966e96a090f8a2c66efed3d5
Showing with 0 additions and 49 deletions.
  1. +0 −49 tests/TestCase/View/Helper/FormHelperTest.php
@@ -2042,55 +2042,6 @@ public function testFormValidationAssociated() {
$this->assertEquals('<div class="error-message">not a valid bar</div>', $result);
}
/**
* testFormValidationAssociatedFirstLevel method
*
* test form error display with associated model.
*
* @return void
*/
public function testFormValidationAssociatedFirstLevel() {
$this->markTestIncomplete('Need to revisit once models work again.');
$data = array(
'ValidateUser' => array('name' => 'mariano'),
'ValidateProfile' => array('full_name' => 'Mariano Iglesias')
);
$result = $this->ValidateUser->create($data);
$this->assertFalse(empty($result));
$this->assertFalse($this->ValidateUser->validates());
$this->assertFalse($this->ValidateUser->ValidateProfile->validates());
$result = $this->Form->create('ValidateUser', array('type' => 'post', 'action' => 'add'));
$encoding = strtolower(Configure::read('App.encoding'));
$expected = array(
'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id', 'accept-charset' => $encoding),
'div' => array('style' => 'display:none;'),
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->error(
'ValidateUser.email', 'Invalid email', array('wrap' => false)
);
$this->assertEquals('Invalid email', $result);
$result = $this->Form->error(
'ValidateProfile.full_name', 'Invalid name', array('wrap' => false)
);
$this->assertEquals('Invalid name', $result);
$result = $this->Form->error(
'ValidateProfile.city', 'Invalid city', array('wrap' => false)
);
$this->assertEquals('Invalid city', $result);
unset($this->ValidateUser->ValidateProfile);
unset($this->ValidateUser);
}
/**
* testFormValidationAssociatedSecondLevel method
*

0 comments on commit 2c35268

Please sign in to comment.
You can’t perform that action at this time.