function FieldUiTestTrait::assertFieldDoesNotExist

Same name in other branches
  1. 10 core/modules/field_ui/tests/src/Traits/FieldUiTestTrait.php \Drupal\Tests\field_ui\Traits\FieldUiTestTrait::assertFieldDoesNotExist()

Asserts that the field doesn't exist in the overview form.

Parameters

string $bundle_path: The bundle path.

string $label: The field label.

1 call to FieldUiTestTrait::assertFieldDoesNotExist()
FieldUiTestTrait::fieldUIAddNewField in core/modules/field_ui/tests/src/Traits/FieldUiTestTrait.php
Creates a new field through the Field UI.

File

core/modules/field_ui/tests/src/Traits/FieldUiTestTrait.php, line 228

Class

FieldUiTestTrait
Provides common functionality for the Field UI test classes.

Namespace

Drupal\Tests\field_ui\Traits

Code

protected function assertFieldDoesNotExist(string $bundle_path, string $label) {
    $original_url = $this->getUrl();
    $this->drupalGet(explode('/fields', $bundle_path)[0] . '/fields');
    $this->assertFieldDoesNotExistOnOverview($label);
    $this->drupalGet($original_url);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.