$node =
$this->
createNode('select', ''
);
$field =
new ChoiceFormField($node);
$this->
assertEquals('select',
$field->
getType(), '->getType() returns radio for a select'
);
} public function testIsMultiple() { $node =
$this->
createNode('input', '',
['type' => 'radio', 'name' => 'name', 'value' => 'foo'
]);
$field =
new ChoiceFormField($node);
$this->
assertFalse($field->
isMultiple(), '->isMultiple() returns false for radio buttons'
);
$node =
$this->
createNode('input', '',
['type' => 'checkbox', 'name' => 'name', 'value' => 'foo'
]);
$field =
new ChoiceFormField($node);
$this->
assertFalse($field->
isMultiple(), '->isMultiple() returns false for checkboxes'
);
$node =
$this->
createNode('select', ''
);
$field =
new ChoiceFormField($node);
$this->
assertFalse($field->
isMultiple(), '->isMultiple() returns false for selects without the multiple attribute'
);