MediaRequirementsTest.php in Drupal 9
File
core/modules/media/tests/src/Functional/MediaRequirementsTest.php
View source
<?php
namespace Drupal\Tests\media\Functional;
class MediaRequirementsTest extends MediaFunctionalTestBase {
protected $defaultTheme = 'stark';
public function testMissingSourceFieldDefinition() {
$media_type = $this
->createMediaType('test');
$field_definition = $media_type
->getSource()
->getSourceFieldDefinition($media_type);
$field_storage_definition = $field_definition
->getFieldStorageDefinition();
$field_definition
->delete();
$field_storage_definition
->delete();
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('/admin/reports/status');
$this
->assertSession()
->statusCodeEquals(200);
}
}