示例#1
0
 /**
  * @covers Control::toString
  */
 public function testToString()
 {
     $this->control->setValue("Wednesday");
     $actual = $this->control->toString();
     $excepted = "Wednesday";
     $this->assertEquals($excepted, $actual);
 }
示例#2
0
 /**
  * Set the value of the control.
  * 
  * @param string $value
  * @return Control $this
  */
 public function setValue($value)
 {
     if ($this->getOption('multiple') && !is_array($value)) {
         $value = (string) $value === '' ? [] : (array) $value;
     }
     return parent::setValue($value);
 }
示例#3
0
 /**
  * Call this method to set the 'value' attribute for this control.
  * Normally, this is set by setValue(), however, for a checkbox, setValue()
  * will determine whether the checkbox is selected or not.
  *
  * @param String value the value to set
  */
 public function setVal($value)
 {
     return parent::setValue($value);
 }