function MediaDisplayTest::setUp
Same name in other branches
- 9 core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php \Drupal\Tests\media\FunctionalJavascript\MediaDisplayTest::setUp()
- 10 core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php \Drupal\Tests\media\FunctionalJavascript\MediaDisplayTest::setUp()
- 11.x core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php \Drupal\Tests\media\FunctionalJavascript\MediaDisplayTest::setUp()
Overrides MediaFunctionalTestTrait::setUp
File
-
core/
modules/ media/ tests/ src/ FunctionalJavascript/ MediaDisplayTest.php, line 28
Class
- MediaDisplayTest
- Basic display tests for Media.
Namespace
Drupal\Tests\media\FunctionalJavascriptCode
protected function setUp() {
parent::setUp();
// Install the optional configs from the standard profile.
$extension_path = drupal_get_path('profile', 'standard');
$optional_install_path = $extension_path . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY;
$storage = new FileStorage($optional_install_path);
$this->container
->get('config.installer')
->installOptionalConfig($storage, '');
// Reset all the static caches and list caches.
$this->container
->get('config.factory')
->reset();
// This test is going to test the display, so we need the standalone URL.
\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.