Sets a widget value within the form.
function testMultipleFieldsWithSameKey() { $form = new SimpleForm(new SimpleFormTag(array()), new SimpleUrl('htp://host')); $form->addWidget(new SimpleCheckboxTag(array('name' => 'a', 'type' => 'checkbox', 'value' => 'me'))); $form->addWidget(new SimpleCheckboxTag(array('name' => 'a', 'type' => 'checkbox', 'value' => 'you'))); $this->assertIdentical($form->getValue(new SimpleByName('a')), false); $this->assertTrue($form->setField(new SimpleByName('a'), 'me')); $this->assertIdentical($form->getValue(new SimpleByName('a')), 'me'); }