public function testDisableValidation() { $node = $this->createSelectNode(array('foo' => false, 'bar' => false)); $field = new ChoiceFormField($node); $field->disableValidation(); $field->setValue('foobar'); $this->assertEquals('foobar', $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.'); $node = $this->createSelectNode(array('foo' => false, 'bar' => false), array('multiple' => 'multiple')); $field = new ChoiceFormField($node); $field->disableValidation(); $field->setValue(array('foobar')); $this->assertEquals(array('foobar'), $field->getValue(), '->disableValidation() allows to set a value which is not in the selected options.'); }