Exemplo n.º 1
0
 public function testSelectCanBeMultiple()
 {
     $select = new Select('people');
     $expected = '<select class="ui dropdown" name="people[]" multiple="multiple"></select>';
     $result = $select->multiple()->render();
     $this->assertEquals($expected, $result);
     $select = new Select('people[]');
     $expected = '<select class="ui dropdown" name="people[]" multiple="multiple"></select>';
     $result = $select->multiple()->render();
     $this->assertEquals($expected, $result);
 }
Exemplo n.º 2
0
 public function select($name, $options = array(), $defaultValue = null)
 {
     $select = new Select($name, $options);
     $selected = $this->getValueFor($name);
     $select->select($selected);
     $select->defaultValue($defaultValue);
     return $select;
 }