Adding test case for validation error display with FormHelper::input(type => password), disproves #4242

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6548 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-03-10 03:54:15 +00:00
parent 204d5109b9
commit bd929c45df

View file

@ -305,6 +305,12 @@ class FormHelperTest extends CakeTestCase {
$this->assertEqual($result, $fields);
}
function testPasswordValidation() {
$this->Form->validationErrors['Contact']['password'] = 'Please provide a password';
$result = $this->Form->input('Contact.password');
$this->assertPattern('/<div[^<>]*class="error-message"[^<>]*>Please provide a password<\/div>/', $result);
}
function testFormValidationAssociated() {
$this->UserForm =& ClassRegistry::getObject('UserForm');
$this->UserForm->OpenidUrl =& ClassRegistry::getObject('OpenidUrl');