You are here

public function SelectTest::testOptionWithoutValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php \Behat\Mink\Tests\Driver\Form\SelectTest::testOptionWithoutValue()

See also

https://github.com/Behat/Mink/issues/193

File

vendor/behat/mink/driver-testsuite/tests/Form/SelectTest.php, line 107

Class

SelectTest

Namespace

Behat\Mink\Tests\Driver\Form

Code

public function testOptionWithoutValue() {
  $session = $this
    ->getSession();
  $session
    ->visit($this
    ->pathTo('/issue193.html'));
  $session
    ->getPage()
    ->selectFieldOption('options-without-values', 'Two');
  $this
    ->assertEquals('Two', $this
    ->findById('options-without-values')
    ->getValue());
  $this
    ->assertTrue($this
    ->findById('two')
    ->isSelected());
  $this
    ->assertFalse($this
    ->findById('one')
    ->isSelected());
  $session
    ->getPage()
    ->selectFieldOption('options-with-values', 'two');
  $this
    ->assertEquals('two', $this
    ->findById('options-with-values')
    ->getValue());
}