class MediaSettingsTest in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/tests/src/Functional/MediaSettingsTest.php \Drupal\Tests\media\Functional\MediaSettingsTest
- 9 core/modules/media/tests/src/Functional/MediaSettingsTest.php \Drupal\Tests\media\Functional\MediaSettingsTest
Testing the media settings.
@group media
Hierarchy
- class \Drupal\Tests\BrowserTestBase extends \PHPUnit\Framework\TestCase uses \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, FunctionalTestSetupTrait, TestSetupTrait, BlockCreationTrait, ConfigTestTrait, ExtensionListTestTrait, ContentTypeCreationTrait, NodeCreationTrait, RandomGeneratorTrait, TestRequirementsTrait, PhpUnitWarnings, UiHelperTrait, UserCreationTrait, XdebugRequestTrait
- class \Drupal\Tests\media\Functional\MediaFunctionalTestBase uses MediaFunctionalTestTrait, MediaTypeCreationTrait
- class \Drupal\Tests\media\Functional\MediaSettingsTest
- class \Drupal\Tests\media\Functional\MediaFunctionalTestBase uses MediaFunctionalTestTrait, MediaTypeCreationTrait
Expanded class hierarchy of MediaSettingsTest
File
- core/
modules/ media/ tests/ src/ Functional/ MediaSettingsTest.php, line 10
Namespace
Drupal\Tests\media\FunctionalView source
class MediaSettingsTest extends MediaFunctionalTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this
->drupalLogin($this
->createUser([
'administer site configuration',
]));
}
/**
* Tests that media warning appears if oEmbed media types exists.
*/
public function testStatusPage() {
$assert_session = $this
->assertSession();
$this
->drupalGet('admin/reports/status');
$assert_session
->pageTextNotContains('It is potentially insecure to display oEmbed content in a frame');
$this
->createMediaType('oembed:video');
$this
->drupalGet('admin/reports/status');
$assert_session
->pageTextContains('It is potentially insecure to display oEmbed content in a frame');
}
}