You are here

public function ErrorHandlingTest::testManipulateInputWithoutForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php \Behat\Mink\Tests\Driver\Custom\ErrorHandlingTest::testManipulateInputWithoutForm()

@expectedException \Behat\Mink\Exception\DriverException @expectedExceptionMessage The selected node does not have a form ancestor.

File

vendor/behat/mink-browserkit-driver/tests/Custom/ErrorHandlingTest.php, line 106

Class

ErrorHandlingTest

Namespace

Behat\Mink\Tests\Driver\Custom

Code

public function testManipulateInputWithoutForm() {
  $html = <<<'HTML'
<html>
<body>
    <form id="test">
        <input type="submit">
    </form>
    <div id="foo">
        <input name="test" value="foo">
    </div>
</body>
</html>
HTML;
  $this->client
    ->setNextResponse(new Response($html));
  $driver = $this
    ->getDriver();
  $driver
    ->visit('/index.php');
  $driver
    ->setValue('//input[./@name="test"]', 'bar');
}