Commit 337963d1 authored by Gábor Hojtsy's avatar Gábor Hojtsy

Issue #2895581 by chr.fritsch, Wim Leers: Add test coverage ensuring that the...

Issue #2895581 by chr.fritsch, Wim Leers: Add test coverage ensuring that the media source field cannot be removed from a media type
parent 7da31e1e
......@@ -51,4 +51,15 @@ public function testSourceFieldSettingsEditing() {
$this->assertSame('txt doc docx pdf odt', FieldConfig::load("media.$media_type_id.field_media_file")->get('settings')['file_extensions']);
}
/**
* Ensure source field deletion is not possible.
*/
public function testPreventSourceFieldDeletion() {
$media_type = $this->createMediaType([], 'file');
$media_type_id = $media_type->id();
$this->drupalGet("admin/structure/media/manage/$media_type_id/fields/media.$media_type_id.field_media_file/delete");
$this->assertSession()->statusCodeEquals(403);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment