|
@@ -835,7 +835,7 @@ class RadioWidgetTest extends TestCase
|
|
|
$input = new RadioWidget($this->templates, $label);
|
|
$input = new RadioWidget($this->templates, $label);
|
|
|
$data = [
|
|
$data = [
|
|
|
'name' => 'field',
|
|
'name' => 'field',
|
|
|
- 'options' => ['value1', 'value2'],
|
|
|
|
|
|
|
+ 'options' => ['value1', 'value2', -1 => 'negative'],
|
|
|
'id' => 'alternative-id',
|
|
'id' => 'alternative-id',
|
|
|
'idPrefix' => 'willBeIgnored',
|
|
'idPrefix' => 'willBeIgnored',
|
|
|
];
|
|
];
|
|
@@ -853,6 +853,12 @@ class RadioWidgetTest extends TestCase
|
|
|
],
|
|
],
|
|
|
'value2',
|
|
'value2',
|
|
|
'/label',
|
|
'/label',
|
|
|
|
|
+ [
|
|
|
|
|
+ 'label' => ['for' => 'alternative-id--1'],
|
|
|
|
|
+ 'input' => ['type' => 'radio', 'name' => 'field', 'value' => '-1', 'id' => 'alternative-id--1'],
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'negative',
|
|
|
|
|
+ '/label',
|
|
|
];
|
|
];
|
|
|
$this->assertHtml($expected, $result);
|
|
$this->assertHtml($expected, $result);
|
|
|
|
|
|