protected function MediaFunctionalTestTrait::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php \Drupal\Tests\media\Functional\MediaFunctionalTestTrait::setUp()
- 9 core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php \Drupal\Tests\media\Functional\MediaFunctionalTestTrait::setUp()
1 method overrides MediaFunctionalTestTrait::setUp()
- OEmbedFormatterTest::setUp in core/
modules/ media/ tests/ src/ Functional/ FieldFormatter/ OEmbedFormatterTest.php
File
- core/
modules/ media/ tests/ src/ Functional/ MediaFunctionalTestTrait.php, line 59
Class
- MediaFunctionalTestTrait
- Trait with helpers for Media functional tests.
Namespace
Drupal\Tests\media\FunctionalCode
protected function setUp() : void {
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');
}