You are here

protected function WidgetOEmbedTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php \Drupal\Tests\media_library\FunctionalJavascript\WidgetOEmbedTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php, line 26

Class

WidgetOEmbedTest
Tests that oEmbed media can be added in the Media library's widget.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();
  $this
    ->lockHttpClientToFixtures();
  $this
    ->hijackProviderEndpoints();

  // Create a user who can use the Media library.
  $user = $this
    ->drupalCreateUser([
    'access content',
    'create basic_page content',
    'view media',
    'create media',
    'administer media',
  ]);
  $this
    ->drupalLogin($user);
}