Generates a control group with a list box.
public static listBoxControlGroup ( string $name, string $select = '', array $data = [], array $htmlOptions = [] ) : string | ||
$name | string | the input name. |
$select | string | the selected value. |
$data | array | data for generating the list options (value=>display). |
$htmlOptions | array | additional HTML attributes. |
Результат | string | the generated control group. |
public function testListBoxControlGroup() { $I = $this->codeGuy; $html = TbHtml::listBoxControlGroup('listbox', '', array('1', '2', '3', '4', '5')); $group = $I->createNode($html, 'div.control-group'); $controls = $group->filter('div.controls'); $I->seeNodeChildren($controls, array('select')); }