public function SelectTest::testElementSelectedStateCheck in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php \Behat\Mink\Tests\Driver\Form\SelectTest::testElementSelectedStateCheck()
@dataProvider testElementSelectedStateCheckDataProvider
File
- vendor/
behat/ mink/ driver-testsuite/ tests/ Form/ SelectTest.php, line 62
Class
Namespace
Behat\Mink\Tests\Driver\FormCode
public function testElementSelectedStateCheck($selectName, $optionValue, $optionText) {
$session = $this
->getSession();
$webAssert = $this
->getAssertSession();
$session
->visit($this
->pathTo('/multiselect_form.html'));
$select = $webAssert
->fieldExists($selectName);
$option = $webAssert
->elementExists('named', array(
'option',
$optionValue,
));
$this
->assertFalse($option
->isSelected());
$select
->selectOption($optionText);
$this
->assertTrue($option
->isSelected());
}