/** * @covers ::__construct * @group Fieldset */ public function testConstruct() { $attributes = ['type' => 'submit', 'name' => '', 'value' => null]; $instance = new Submit(); $this->assertEquals($attributes, $instance->getAttributes()); }
/** * Renders a submit with the appropriate classes. * * @param Submit $select * * @return string */ public function renderSubmit(Submit $select) { $attributes = $select->getAttributes(); if (!isset($attributes['class'])) { $attributes['class'] = ''; } $attributes['class'] .= ' btn btn-default'; return Html::tag('button', $attributes, $select->getValue()); }