MediaSettingsTest.php

Same filename in other branches
  1. 9 core/modules/media/tests/src/Functional/MediaSettingsTest.php
  2. 10 core/modules/media/tests/src/Functional/MediaSettingsTest.php
  3. 11.x core/modules/media/tests/src/Functional/MediaSettingsTest.php

Namespace

Drupal\Tests\media\Functional

File

core/modules/media/tests/src/Functional/MediaSettingsTest.php

View source
<?php

namespace Drupal\Tests\media\Functional;


/**
 * Testing the media settings.
 *
 * @group media
 */
class MediaSettingsTest extends MediaFunctionalTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected $defaultTheme = 'stark';
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() {
        parent::setUp();
        $this->drupalLogin($this->createUser([
            'administer site configuration',
        ]));
    }
    
    /**
     * Test 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');
    }

}

Classes

Title Deprecated Summary
MediaSettingsTest Testing the media settings.

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