public function testElementWithLabelAndID() { $html = Form::text(null, ['id' => 'ID', 'label' => 'Label']); $this->assertEquals('<label for="ID">Label</label><input type="text" id="ID"/>', $html); $html = Form::checkbox(null, ['id' => 'ID', 'label' => 'Label']); $this->assertEquals('<label for="ID">Label</label><input type="checkbox" value="1" id="ID"/>', $html); $html = Form::select(null, ['id' => 'ID', 'label' => 'Label']); $this->assertEquals('<label for="ID">Label</label><select id="ID"></select>', $html); $html = Form::radio(null, ['id' => 'ID', 'label' => 'Label'], ['a']); $this->assertEquals('<label>Label</label><label><input type="radio" value="a" id="ID_1"/> a</label>', $html); $html = Form::checkboxList(null, ['id' => 'ID', 'label' => 'Label'], ['a']); $this->assertEquals('<label>Label</label><label><input type="checkbox" value="a" id="ID_1"/> a</label>', $html); }