You are here

protected function ManageFieldsFunctionalTest::deleteField in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php \Drupal\Tests\field_ui\Functional\ManageFieldsFunctionalTest::deleteField()
  2. 10 core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php \Drupal\Tests\field_ui\Functional\ManageFieldsFunctionalTest::deleteField()

Tests deleting a field from the field edit form.

1 call to ManageFieldsFunctionalTest::deleteField()
ManageFieldsFunctionalTest::testCRUDFields in core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php
Runs the field CRUD tests.

File

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

Class

ManageFieldsFunctionalTest
Tests the Field UI "Manage fields" screen.

Namespace

Drupal\Tests\field_ui\Functional

Code

protected function deleteField() {

  // Delete the field.
  $field_id = 'node.' . $this->contentType . '.' . $this->fieldName;
  $this
    ->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id);
  $this
    ->clickLink(t('Delete'));
  $this
    ->assertSession()
    ->statusCodeEquals(200);
}