mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding test to disprove #368. FormHelper::year() is working correctly and includes model name in the input name attribute.
This commit is contained in:
parent
8bc84948f0
commit
0293a840c5
1 changed files with 18 additions and 0 deletions
|
@ -4568,6 +4568,24 @@ class FormHelperTest extends CakeTestCase {
|
|||
'/select',
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
|
||||
$this->Form->data = array();
|
||||
$this->Form->create('Contact');
|
||||
$result = $this->Form->year('published', 2006, 2008, null, array('empty' => false));
|
||||
$expected = array(
|
||||
array('select' => array('name' => 'data[Contact][published][year]', 'id' => 'ContactPublishedYear')),
|
||||
array('option' => array('value' => '2008')),
|
||||
'2008',
|
||||
'/option',
|
||||
array('option' => array('value' => '2007')),
|
||||
'2007',
|
||||
'/option',
|
||||
array('option' => array('value' => '2006')),
|
||||
'2006',
|
||||
'/option',
|
||||
'/select',
|
||||
);
|
||||
$this->assertTags($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue