Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing test that is no longer relevant as we now use template strings

  • Loading branch information...
commit bf0f1580792adbc198f08057b9802cd469ea014f 1 parent 89a2c12
José Lorenzo Rodríguez lorenzo authored
Showing with 0 additions and 99 deletions.
  1. +0 −99 tests/TestCase/View/Helper/FormHelperTest.php
99 tests/TestCase/View/Helper/FormHelperTest.php
View
@@ -7589,105 +7589,6 @@ public function testSaveManyRecordFormValidationErrors() {
}
/**
- * tests the ability to change the order of the form input placeholder "input", "label", "before", "between", "after", "error"
- *
- * @return void
- */
- public function testInputTemplate() {
- $this->markTestIncomplete('Need to revisit once models work again.');
- $result = $this->Form->input('Contact.email', array(
- 'type' => 'text', 'format' => array('input')
- ));
- $expected = array(
- 'div' => array('class' => 'input text'),
- 'input' => array(
- 'type' => 'text', 'name' => 'Contact[email]',
- 'id' => 'ContactEmail'
- ),
- '/div'
- );
- $this->assertTags($result, $expected);
-
- $result = $this->Form->input('Contact.email', array(
- 'type' => 'text', 'format' => array('input', 'label'),
- 'label' => '<em>Email (required)</em>'
- ));
- $expected = array(
- 'div' => array('class' => 'input text'),
- array('input' => array(
- 'type' => 'text', 'name' => 'Contact[email]',
- 'id' => 'ContactEmail'
- )),
- 'label' => array('for' => 'ContactEmail'),
- 'em' => array(),
- 'Email (required)',
- '/em',
- '/label',
- '/div'
- );
- $this->assertTags($result, $expected);
-
- $result = $this->Form->input('Contact.email', array(
- 'type' => 'text', 'format' => array('input', 'between', 'label', 'after'),
- 'between' => '<div>Something in the middle</div>',
- 'after' => '<span>Some text at the end</span>'
- ));
- $expected = array(
- 'div' => array('class' => 'input text'),
- array('input' => array(
- 'type' => 'text', 'name' => 'Contact[email]',
- 'id' => 'ContactEmail'
- )),
- array('div' => array()),
- 'Something in the middle',
- '/div',
- 'label' => array('for' => 'ContactEmail'),
- 'Email',
- '/label',
- 'span' => array(),
- 'Some text at the end',
- '/span',
- '/div'
- );
- $this->assertTags($result, $expected);
-
- $result = $this->Form->input('Contact.method', array(
- 'type' => 'radio',
- 'options' => array('email' => 'Email', 'pigeon' => 'Pigeon'),
- 'between' => 'I am between',
- ));
- $expected = array(
- 'div' => array('class' => 'input radio'),
- 'fieldset' => array(),
- 'legend' => array(),
- 'Method',
- '/legend',
- 'I am between',
- 'input' => array(
- 'type' => 'hidden', 'name' => 'Contact[method]',
- 'value' => '', 'id' => 'ContactMethod_'
- ),
- array('input' => array(
- 'type' => 'radio', 'name' => 'Contact[method]',
- 'value' => 'email', 'id' => 'ContactMethodEmail'
- )),
- array('label' => array('for' => 'ContactMethodEmail')),
- 'Email',
- '/label',
- array('input' => array(
- 'type' => 'radio', 'name' => 'Contact[method]',
- 'value' => 'pigeon', 'id' => 'ContactMethodPigeon'
- )),
- array('label' => array('for' => 'ContactMethodPigeon')),
- 'Pigeon',
- '/label',
- '/fieldset',
- '/div',
- );
- $this->assertTags($result, $expected);
- }
-
-/**
* test that some html5 inputs + FormHelper::__call() work
*
* @return void
Please sign in to comment.
Something went wrong with that request. Please try again.