mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
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:
parent
204d5109b9
commit
bd929c45df
1 changed files with 6 additions and 0 deletions
|
@ -305,6 +305,12 @@ class FormHelperTest extends CakeTestCase {
|
||||||
$this->assertEqual($result, $fields);
|
$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() {
|
function testFormValidationAssociated() {
|
||||||
$this->UserForm =& ClassRegistry::getObject('UserForm');
|
$this->UserForm =& ClassRegistry::getObject('UserForm');
|
||||||
$this->UserForm->OpenidUrl =& ClassRegistry::getObject('OpenidUrl');
|
$this->UserForm->OpenidUrl =& ClassRegistry::getObject('OpenidUrl');
|
||||||
|
|
Loading…
Add table
Reference in a new issue