示例#1
0
 /**
  * @dataProvider notSetAttributeAddProvider()
  */
 public function testAddToAttributeArrayNotSet($addition, $expected)
 {
     $attributes = array('id' => 'my-element');
     $expected = array('id' => 'my-element', 'class' => $expected);
     $this->assertSame($expected, Html::addToAttributeArray($attributes, 'class', $addition));
 }
示例#2
0
 public function select($name, array $values, $selected = null, $multiple = false, array $attributes = array())
 {
     $attributes = Html::addToAttributeArray($attributes, 'class', 'form-control');
     return Html::select($name, $values, $selected, $multiple, $attributes);
 }