function MediaOverviewTest::setUp

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

Overrides BrowserTestBase::setUp

File

core/modules/media_library/tests/src/FunctionalJavascript/MediaOverviewTest.php, line 27

Class

MediaOverviewTest
Tests the grid-style media overview page.

Namespace

Drupal\Tests\media_library\FunctionalJavascript

Code

protected function setUp() : void {
    parent::setUp();
    // Create a few example media items for use in selection.
    $this->createMediaItems([
        'type_one' => [
            'Horse',
            'Bear',
            'Cat',
            'Dog',
        ],
        'type_two' => [
            'Crocodile',
            'Lizard',
            'Snake',
            'Turtle',
        ],
    ]);
    $this->drupalPlaceBlock('local_tasks_block');
    $this->drupalPlaceBlock('local_actions_block');
    $user = $this->drupalCreateUser([
        'access media overview',
        'create media',
        'delete any media',
        'update any media',
    ]);
    $this->drupalLogin($user);
}

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