function MediaSourceTestBase::setUp

Same name in other branches
  1. 9 core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php \Drupal\Tests\media\FunctionalJavascript\MediaSourceTestBase::setUp()
  2. 10 core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php \Drupal\Tests\media\FunctionalJavascript\MediaSourceTestBase::setUp()
  3. 11.x core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php \Drupal\Tests\media\FunctionalJavascript\MediaSourceTestBase::setUp()

Overrides MediaFunctionalTestTrait::setUp

1 call to MediaSourceTestBase::setUp()
MediaSourceOEmbedVideoTest::setUp in core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php
1 method overrides MediaSourceTestBase::setUp()
MediaSourceOEmbedVideoTest::setUp in core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php

File

core/modules/media/tests/src/FunctionalJavascript/MediaSourceTestBase.php, line 17

Class

MediaSourceTestBase
Base class for media source tests.

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function setUp() {
    parent::setUp();
    // Let's set the canonical flag in the base class of the source tests,
    // because every source test has to check the output on the view page.
    \Drupal::configFactory()->getEditable('media.settings')
        ->set('standalone_url', TRUE)
        ->save(TRUE);
    $this->container
        ->get('router.builder')
        ->rebuild();
}

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