You are here

protected function AssertLegacyTrait::assertNoField in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php \Drupal\FunctionalTests\AssertLegacyTrait::assertNoField()

Asserts that a field does NOT exist with the given name or ID.

Parameters

string $field: Name or ID of field to assert.

Deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->assertSession()->fieldNotExists() or $this->assertSession()->buttonNotExists() instead.

25 calls to AssertLegacyTrait::assertNoField()
BlockLanguageTest::testLanguageBlockVisibility in core/modules/block/tests/src/Functional/BlockLanguageTest.php
Tests the visibility settings for the blocks based on language.
BrowserTestBaseTest::testFieldAssertsForTextfields in core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
Tests legacy field asserts using textfields.
CommentBookTest::testBookCommentPrint in core/modules/comment/tests/src/Functional/CommentBookTest.php
Tests comments in book export.
CommentInterfaceTest::testCommentInterface in core/modules/comment/tests/src/Functional/CommentInterfaceTest.php
Tests the comment interface.
CommentNonNodeTest::testCommentFunctionality in core/modules/comment/tests/src/Functional/CommentNonNodeTest.php
Tests anonymous comment functionality.

... See full list

File

core/tests/Drupal/FunctionalTests/AssertLegacyTrait.php, line 299

Class

AssertLegacyTrait
Provides convenience methods for assertions in browser tests.

Namespace

Drupal\FunctionalTests

Code

protected function assertNoField($field) {
  $this
    ->assertNoFieldByXPath($this
    ->constructFieldXpath('name', $field) . '|' . $this
    ->constructFieldXpath('id', $field));
}