function MediaSettingsTest::testStatusPage

Same name in other branches
  1. 9 core/modules/media/tests/src/Functional/MediaSettingsTest.php \Drupal\Tests\media\Functional\MediaSettingsTest::testStatusPage()
  2. 8.9.x core/modules/media/tests/src/Functional/MediaSettingsTest.php \Drupal\Tests\media\Functional\MediaSettingsTest::testStatusPage()

Tests that media warning appears if oEmbed media types exists.

File

core/modules/media/tests/src/Functional/MediaSettingsTest.php, line 35

Class

MediaSettingsTest
Testing the media settings.

Namespace

Drupal\Tests\media\Functional

Code

public function testStatusPage() : void {
    $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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.