protected function MediaOverviewTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 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 20
Class
- MediaOverviewTest
- Tests the grid-style media overview page.
Namespace
Drupal\Tests\media_library\FunctionalJavascriptCode
protected function setUp() {
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);
}