You are here

public function WebAssert::fieldNotExists in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/src/WebAssert.php \Behat\Mink\WebAssert::fieldNotExists()

Checks that specific field does not exists on the current page.

Parameters

string $field field id|name|label|value:

TraversableElement $container document to check against:

Throws

ExpectationException

File

vendor/behat/mink/src/WebAssert.php, line 652

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function fieldNotExists($field, TraversableElement $container = null) {
  $container = $container ?: $this->session
    ->getPage();
  $node = $container
    ->findField($field);
  $this
    ->assert(null === $node, sprintf('A field "%s" appears on this page, but it should not.', $field));
}