You are here

public function RadioTest::testSetValueXPathEscaping in Zircon Profile 8

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

See also

https://github.com/Behat/MinkSahiDriver/issues/32

File

vendor/behat/mink/driver-testsuite/tests/Form/RadioTest.php, line 72

Class

RadioTest

Namespace

Behat\Mink\Tests\Driver\Form

Code

public function testSetValueXPathEscaping() {
  $session = $this
    ->getSession();
  $session
    ->visit($this
    ->pathTo('/advanced_form.html'));
  $page = $session
    ->getPage();
  $sex = $page
    ->find('xpath', '//*[@name = "sex"]' . "\n|\n" . '//*[@id = "sex"]');
  $this
    ->assertNotNull($sex, 'xpath with line ending works');
  $sex
    ->setValue('m');
  $this
    ->assertEquals('m', $sex
    ->getValue(), 'no double xpath escaping during radio button value change');
}