Symfony\Component\DomCrawler\Field\ChoiceFormField::select PHP Method

select() public method

Sets the value of the field.
public select ( string $value )
$value string The value of the field
    public function select($value)
    {
        $this->setValue($value);
    }

Usage Example

Example #1
0
 public function testOptionWithNoValue()
 {
     $node = $this->createSelectNodeWithEmptyOption(array('foo' => false, 'bar' => false));
     $field = new ChoiceFormField($node);
     $field->select('foo');
     $this->assertEquals('foo', $field->getValue(), '->select() changes the selected option');
 }
All Usage Examples Of Symfony\Component\DomCrawler\Field\ChoiceFormField::select