Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. WebAssert.php

function WebAssert::fieldNotExists

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

Parameters

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

TraversableElement|null $container document to check against:

Return value

void

Throws

ExpectationException

File

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

Class

WebAssert
Mink web assertions tool.

Namespace

Behat\Mink

Code

public function fieldNotExists(string $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));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal