public function testActiveCheckBoxControlGroup() { $I = $this->codeGuy; $html = TbHtml::activeCheckBoxControlGroup(new Dummy(), 'checkbox'); $group = $I->createNode($html, 'div.control-group'); $I->seeNodeChildren($group, array('input[type=hidden]', 'label.checkbox')); $label = $group->filter('label.checkbox'); $I->seeNodeChildren($label, array('input[type=checkbox]')); }
/** * Generates a control group with a check box for a model attribute. * @param CModel $model the data model. * @param string $attribute the attribute name. * @param array $htmlOptions additional HTML attributes. * @return string the generated row. * @see TbHtml::activeCheckBoxControlGroup */ public function checkBoxControlGroup($model, $attribute, $htmlOptions = array()) { $htmlOptions = $this->processRowOptions($model, $attribute, $htmlOptions); return TbHtml::activeCheckBoxControlGroup($model, $attribute, $htmlOptions); }