function ManageFieldsFunctionalTest::testNonExistentFieldUrls

Same name in other branches
  1. 8.9.x core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php \Drupal\Tests\field_ui\Functional\ManageFieldsFunctionalTest::testNonExistentFieldUrls()

Tests the access to non-existent field URLs.

File

core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php, line 862

Class

ManageFieldsFunctionalTest
Tests the Field UI "Manage fields" screen.

Namespace

Drupal\Tests\field_ui\Functional

Code

public function testNonExistentFieldUrls() {
    $field_id = 'node.foo.bar';
    $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id);
    $this->assertSession()
        ->statusCodeEquals(404);
    $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id . '/storage');
    $this->assertSession()
        ->statusCodeEquals(404);
}

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