You are here

protected function MediaFunctionalTestTrait::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php \Drupal\Tests\media\Functional\MediaFunctionalTestTrait::setUp()
13 calls to MediaFunctionalTestTrait::setUp()
MediaAccessTest::setUp in core/modules/media/tests/src/Functional/MediaAccessTest.php
MediaBulkFormTest::setUp in core/modules/media/tests/src/Functional/MediaBulkFormTest.php
MediaDisplayTest::setUp in core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php
MediaEmbedFilterConfigurationUiTest::setUp in core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiTest.php
MediaOverviewPageTest::setUp in core/modules/media/tests/src/Functional/MediaOverviewPageTest.php

... See full list

13 methods override MediaFunctionalTestTrait::setUp()
MediaAccessTest::setUp in core/modules/media/tests/src/Functional/MediaAccessTest.php
MediaBulkFormTest::setUp in core/modules/media/tests/src/Functional/MediaBulkFormTest.php
MediaDisplayTest::setUp in core/modules/media/tests/src/FunctionalJavascript/MediaDisplayTest.php
MediaEmbedFilterConfigurationUiTest::setUp in core/modules/media/tests/src/FunctionalJavascript/MediaEmbedFilterConfigurationUiTest.php
MediaOverviewPageTest::setUp in core/modules/media/tests/src/Functional/MediaOverviewPageTest.php

... See full list

File

core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php, line 59

Class

MediaFunctionalTestTrait
Trait with helpers for Media functional tests.

Namespace

Drupal\Tests\media\Functional

Code

protected function setUp() {
  parent::setUp();

  // Have two users ready to be used in tests.
  $this->adminUser = $this
    ->drupalCreateUser(static::$adminUserPermissions);
  $this->nonAdminUser = $this
    ->drupalCreateUser([]);

  // Start off logged in as admin.
  $this
    ->drupalLogin($this->adminUser);
  $this->storage = $this->container
    ->get('entity_type.manager')
    ->getStorage('media');
}