mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Remove duplicated assertions.
These assertions are effectively duplicated in the next test method.
This commit is contained in:
parent
ac1f64abc9
commit
e132a7c856
1 changed files with 0 additions and 77 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Reference in a new issue