function ManageFieldsLifecycleTest::deleteField
Same name in other branches
- 10 core/modules/field_ui/tests/src/Functional/ManageFieldsLifecycleTest.php \Drupal\Tests\field_ui\Functional\ManageFieldsLifecycleTest::deleteField()
Tests deleting a field from the field edit form.
1 call to ManageFieldsLifecycleTest::deleteField()
- ManageFieldsLifecycleTest::testCRUDFields in core/
modules/ field_ui/ tests/ src/ Functional/ ManageFieldsLifecycleTest.php - Runs the field CRUD tests.
File
-
core/
modules/ field_ui/ tests/ src/ Functional/ ManageFieldsLifecycleTest.php, line 267
Class
- ManageFieldsLifecycleTest
- Tests the Field UI "Manage fields" screen.
Namespace
Drupal\Tests\field_ui\FunctionalCode
protected function deleteField() : void {
// Delete the field.
$field_id = 'node.' . $this->contentType . '.' . $this->fieldName;
$this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id);
$this->clickLink('Delete');
$this->assertSession()
->statusCodeEquals(200);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.