Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moving test method and adding doc block.

  • Loading branch information...
commit 55fc72c5337b709ea207377d833c0d22b4fa472c 1 parent 4752fc0
@markstory markstory authored
Showing with 15 additions and 10 deletions.
  1. +15 −10 cake/tests/cases/libs/view/helpers/form.test.php
View
25 cake/tests/cases/libs/view/helpers/form.test.php
@@ -2373,6 +2373,21 @@ function testError() {
}
/**
+ * test error options when using form->input();
+ *
+ * @return void
+ */
+ function testInputErrorEscape() {
+ $this->Form->create('ValidateProfile');
+ $this->Form->validationErrors['ValidateProfile']['city'] = 'required<br>';
+ $result = $this->Form->input('city',array('error' => array('escape' => true)));
+ $this->assertPattern('/required&lt;br&gt;/', $result);
+
+ $result = $this->Form->input('city',array('error' => array('escape' => false)));
+ $this->assertPattern('/required<br>/', $result);
+ }
+
+/**
* testPassword method
*
* Test password element generation
@@ -5579,15 +5594,5 @@ function testMultiRecordFormValidationErrors() {
$result = $this->Form->error('2.city');
$this->assertTags($result, array('div' => array('class' => 'error-message'), 'Error in field city', '/div'));
}
-
- function testInputErrorEscape() {
- $this->Form->create('ValidateProfile');
- $this->Form->validationErrors['ValidateProfile']['city'] = 'required<br>';
- $result = $this->Form->input('city',array('error' => array('escape' => true)));
- $this->assertPattern('/required&lt;br&gt;/', $result);
-
- $result = $this->Form->input('city',array('error' => array('escape' => false)));
- $this->assertPattern('/required<br>/', $result);
- }
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.