public function MediaSourceFileTest::testPreventSourceFieldDeletion in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media/tests/src/Functional/MediaSourceFileTest.php \Drupal\Tests\media\Functional\MediaSourceFileTest::testPreventSourceFieldDeletion()
Ensure source field deletion is not possible.
File
- core/
modules/ media/ tests/ src/ Functional/ MediaSourceFileTest.php, line 50
Class
- MediaSourceFileTest
- Tests the file media source.
Namespace
Drupal\Tests\media\FunctionalCode
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);
}