Пример #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);
 }
Пример #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;
 }