Remove duplicated assertions.

These assertions are effectively duplicated in the next test method.
This commit is contained in:
mark_story 2013-01-07 21:00:14 -05:00
parent ac1f64abc9
commit e132a7c856

View file

@ -3294,83 +3294,6 @@ class FormHelperTest extends CakeTestCase {
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Newsletter.subscribe', array('legend' => 'Legend title', 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe')));
$expected = array(
'div' => array('class' => 'input radio'),
'fieldset' => array(),
'legend' => array(),
'Legend title',
'/legend',
'input' => array('type' => 'hidden', 'name' => 'data[Newsletter][subscribe]', 'value' => '', 'id' => 'NewsletterSubscribe_'),
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '0', 'id' => 'NewsletterSubscribe0')),
array('label' => array('for' => 'NewsletterSubscribe0')),
'Unsubscribe',
'/label',
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '1', 'id' => 'NewsletterSubscribe1')),
array('label' => array('for' => 'NewsletterSubscribe1')),
'Subscribe',
'/label',
'/fieldset',
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Newsletter.subscribe', array('legend' => false, 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe')));
$expected = array(
'div' => array('class' => 'input radio'),
'input' => array('type' => 'hidden', 'name' => 'data[Newsletter][subscribe]', 'value' => '', 'id' => 'NewsletterSubscribe_'),
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '0', 'id' => 'NewsletterSubscribe0')),
array('label' => array('for' => 'NewsletterSubscribe0')),
'Unsubscribe',
'/label',
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '1', 'id' => 'NewsletterSubscribe1')),
array('label' => array('for' => 'NewsletterSubscribe1')),
'Subscribe',
'/label',
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Newsletter.subscribe', array('legend' => 'Legend title', 'label' => false, 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe')));
$expected = array(
'div' => array('class' => 'input radio'),
'fieldset' => array(),
'legend' => array(),
'Legend title',
'/legend',
'input' => array('type' => 'hidden', 'name' => 'data[Newsletter][subscribe]', 'value' => '', 'id' => 'NewsletterSubscribe_'),
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '0', 'id' => 'NewsletterSubscribe0')),
'Unsubscribe',
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '1', 'id' => 'NewsletterSubscribe1')),
'Subscribe',
'/fieldset',
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Newsletter.subscribe', array('legend' => false, 'label' => false, 'type' => 'radio', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe')));
$expected = array(
'div' => array('class' => 'input radio'),
'input' => array('type' => 'hidden', 'name' => 'data[Newsletter][subscribe]', 'value' => '', 'id' => 'NewsletterSubscribe_'),
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '0', 'id' => 'NewsletterSubscribe0')),
'Unsubscribe',
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '1', 'id' => 'NewsletterSubscribe1')),
'Subscribe',
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->input('Newsletter.subscribe', array('legend' => false, 'label' => false, 'type' => 'radio', 'value' => '1', 'options' => array('0' => 'Unsubscribe', '1' => 'Subscribe')));
$expected = array(
'div' => array('class' => 'input radio'),
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '0', 'id' => 'NewsletterSubscribe0')),
'Unsubscribe',
array('input' => array('type' => 'radio', 'name' => 'data[Newsletter][subscribe]', 'value' => '1', 'id' => 'NewsletterSubscribe1', 'checked' => 'checked')),
'Subscribe',
'/div'
);
$this->assertTags($result, $expected);
$result = $this->Form->radio('Employee.gender', array('male' => 'Male', 'female' => 'Female'));
$expected = array(
'fieldset' => array(),