Permalink
Browse files

Unskip additional tests.

Make unskipped tests much simpler. We are really only interested in the
hidden field not being in the output.
  • Loading branch information...
1 parent c900083 commit d935b7aeb720b3485e874a40f29223599baca6ca @markstory markstory committed with markstory Feb 19, 2014
Showing with 1 addition and 42 deletions.
  1. +1 −42 tests/TestCase/View/Helper/FormHelperTest.php
@@ -5023,52 +5023,11 @@ public function testInputMultipleCheckboxes() {
* @return void
*/
public function testSelectHiddenFieldOmission() {
- $this->markTestIncomplete('Need to revisit once models work again.');
$result = $this->Form->select('Model.multi_field',
array('first', 'second'),
array('multiple' => 'checkbox', 'hiddenField' => false, 'value' => null)
);
- $expected = array(
- array('div' => array('class' => 'checkbox')),
- array('input' => array('type' => 'checkbox', 'name' => 'Model[multi_field][]', 'value' => '0', 'id' => 'ModelMultiField0')),
- array('label' => array('for' => 'ModelMultiField0')),
- 'first',
- '/label',
- '/div',
- array('div' => array('class' => 'checkbox')),
- array('input' => array('type' => 'checkbox', 'name' => 'Model[multi_field][]', 'value' => '1', 'id' => 'ModelMultiField1')),
- array('label' => array('for' => 'ModelMultiField1')),
- 'second',
- '/label',
- '/div'
- );
- $this->assertTags($result, $expected);
-
- $result = $this->Form->input('Model.multi_field', array(
- 'options' => array('first', 'second'),
- 'multiple' => 'checkbox',
- 'hiddenField' => false
- ));
- $expected = array(
- array('div' => array('class' => 'input select')),
- array('label' => array('for' => 'ModelMultiField')),
- 'Multi Field',
- '/label',
- array('div' => array('class' => 'checkbox')),
- array('input' => array('type' => 'checkbox', 'name' => 'Model[multi_field][]', 'value' => '0', 'id' => 'ModelMultiField0')),
- array('label' => array('for' => 'ModelMultiField0')),
- 'first',
- '/label',
- '/div',
- array('div' => array('class' => 'checkbox')),
- array('input' => array('type' => 'checkbox', 'name' => 'Model[multi_field][]', 'value' => '1', 'id' => 'ModelMultiField1')),
- array('label' => array('for' => 'ModelMultiField1')),
- 'second',
- '/label',
- '/div',
- '/div'
- );
- $this->assertTags($result, $expected);
+ $this->assertNotContains('type="hidden"', $result);
}
/**

0 comments on commit d935b7a

Please sign in to comment.