Skip to content

Commit

Permalink
Integration test for using errors put directly on an entity is already
Browse files Browse the repository at this point in the history
done, no need to have a duplicate
  • Loading branch information
lorenzo committed Feb 27, 2014
1 parent 00ef8ed commit 2f5499d
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions tests/TestCase/View/Helper/FormHelperTest.php
Expand Up @@ -2024,46 +2024,6 @@ public function testEmptyInputErrorValidation() {
$this->assertTags($result, $expected);
}

/**
* testFormValidationAssociated method
*
* test display of form errors in conjunction with model::validates.
*
* @return void
*/
public function testFormValidationAssociated() {
$this->markTestIncomplete('Need to revisit once models work again.');

$data = array(
'UserForm' => array('name' => 'user'),
'OpenidUrl' => array('url' => 'http://www.cakephp.org')
);

$result = $this->UserForm->OpenidUrl->create($data);
$this->assertFalse(empty($result));
$this->assertFalse($this->UserForm->OpenidUrl->validates());

$result = $this->Form->create('UserForm', array('type' => 'post', 'action' => 'login'));
$encoding = strtolower(Configure::read('App.encoding'));
$expected = array(
'form' => array(
'method' => 'post', 'action' => '/user_forms/login', 'id' => 'UserFormLoginForm',
'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(
'OpenidUrl.openid_not_registered', 'Error, not registered', array('wrap' => false)
);
$this->assertEquals('Error, not registered', $result);

unset($this->UserForm->OpenidUrl, $this->UserForm);
}

/**
* testFormValidationAssociatedFirstLevel method
*
Expand Down

0 comments on commit 2f5499d

Please sign in to comment.