public function ChoiceFormFieldTest::testOptionWithNoValue in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Tests/Field/ChoiceFormFieldTest.php \Symfony\Component\DomCrawler\Tests\Field\ChoiceFormFieldTest::testOptionWithNoValue()
File
- vendor/
symfony/ dom-crawler/ Tests/ Field/ ChoiceFormFieldTest.php, line 318
Class
Namespace
Symfony\Component\DomCrawler\Tests\FieldCode
public function testOptionWithNoValue() {
$node = $this
->createSelectNodeWithEmptyOption(array(
'foo' => false,
'bar' => false,
));
$field = new ChoiceFormField($node);
$this
->assertEquals('foo', $field
->getValue());
$node = $this
->createSelectNodeWithEmptyOption(array(
'foo' => false,
'bar' => true,
));
$field = new ChoiceFormField($node);
$this
->assertEquals('bar', $field
->getValue());
$field
->select('foo');
$this
->assertEquals('foo', $field
->getValue(), '->select() changes the selected option');
}