You are here

public function ErrorHandlingTest::testNotMatchingHtml5FormId 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::testNotMatchingHtml5FormId()

@expectedException \Behat\Mink\Exception\DriverException @expectedExceptionMessage The selected node has an invalid form attribute (foo)

File

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

Class

ErrorHandlingTest

Namespace

Behat\Mink\Tests\Driver\Custom

Code

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