function testNoOptionsByDefault() { $input = new T_Form_Radio('myalias', 'mylabel'); $this->assertSame($input->getOptions(), array()); }
/** * Sets the submission as required. * * @return T_Form_Element fluent interface */ function setRequired() { parent::setRequired(); // if this is definitely required, we want to remove any 'not present' // option key from the list of options. if ($this->no_input_key) { $options = $this->getOptions(); unset($options[$this->no_input_key]); $this->setOptions($options); } return $this; }
/** * Get the test element. * * @return T_Form_Text */ function getElement($name, $label) { $element = new T_Form_Radio($name, $label); $element->setOptions(array('test' => '1', 'dave' => 'fred', 'swadg' => 'asdgf')); return $element; }