Ejemplo n.º 1
0
 /**
  * @covers ::__construct
  * @group  Fieldset
  */
 public function testConstruct()
 {
     $attributes = ['type' => 'submit', 'name' => '', 'value' => null];
     $instance = new Submit();
     $this->assertEquals($attributes, $instance->getAttributes());
 }
Ejemplo n.º 2
0
 /**
  * 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());
 }