Example #1
0
 public function setOptions(array $options)
 {
     $this->options = $options;
     foreach ($options as $value => $label) {
         $radio = new Radio($this->attributes['name']);
         $radio->setLabel($label);
         $radio->setValue($value);
         $this->radioElements[$value] = $radio;
     }
     return $this;
 }
Example #2
0
 /**
  * @covers Radio::setValue
  */
 public function testSetValue()
 {
     $value = "June";
     $radio = $this->radio->setValue($value);
     $this->assertInstanceOf("Radio", $radio);
 }