function MediaEmbedFilterTestBase::setUp

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

Overrides MediaFunctionalTestTrait::setUp

File

core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterTestBase.php, line 38

Class

MediaEmbedFilterTestBase
Base class for media embed filter configuration tests.

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    $format = FilterFormat::create([
        'format' => 'media_embed_test',
        'name' => 'Test format',
        'filters' => [],
    ]);
    $format->save();
    $this->drupalLogin($this->drupalCreateUser([
        'administer filters',
        $format->getPermissionName(),
    ]));
}

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