mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-02 17:42:41 +00:00
Reformatting tests, and fixing trailing whitespace.
Adding doc comments for new form helper tests.
This commit is contained in:
parent
6123ed47c4
commit
dac26d92bc
2 changed files with 74 additions and 66 deletions
|
@ -593,7 +593,7 @@ class HelperTest extends CakeTestCase {
|
|||
$this->assertEqual($result, '<script>alert(document.cookie)</script>');
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* testMultiDimensionalField method
|
||||
*
|
||||
* @access public
|
||||
|
@ -617,7 +617,6 @@ class HelperTest extends CakeTestCase {
|
|||
$this->assertEqual($this->View->association,'HelperTestTag');
|
||||
$this->assertEqual($this->View->modelId,1);
|
||||
|
||||
|
||||
$this->Helper->setEntity('HelperTestPost.0.HelperTestComment.1.HelperTestTag.1.fake');
|
||||
$this->assertEqual($this->View->model,'HelperTestPost');
|
||||
$this->assertEqual($this->View->association,'HelperTestTag');
|
||||
|
@ -651,6 +650,5 @@ class HelperTest extends CakeTestCase {
|
|||
$this->assertEqual($result,'My Title');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
|
@ -5478,6 +5478,11 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the generation of fields for a multi record form.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testMultiRecordForm() {
|
||||
$this->Form->create('ValidateProfile');
|
||||
$this->Form->data['ValidateProfile'][1]['ValidateItem'][2]['name'] = 'Value';
|
||||
|
@ -5556,6 +5561,11 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->assertTags($result, $expected,true);
|
||||
}
|
||||
|
||||
/**
|
||||
* test the correct display of multi-record form validation errors.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testMultiRecordFormValidationErrors() {
|
||||
$this->Form->create('ValidateProfile');
|
||||
$this->Form->validationErrors['ValidateProfile'][2]['ValidateItem'][1]['name'] = 'Error in field name';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue