function MediaFunctionalTestTrait::setUp
Same name in other branches
- 9 core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php \Drupal\Tests\media\Functional\MediaFunctionalTestTrait::setUp()
- 8.9.x core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php \Drupal\Tests\media\Functional\MediaFunctionalTestTrait::setUp()
- 11.x core/modules/media/tests/src/Functional/MediaFunctionalTestTrait.php \Drupal\Tests\media\Functional\MediaFunctionalTestTrait::setUp()
15 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 - MediaEmbedFilterTestBase::setUp in core/
modules/ media/ tests/ src/ FunctionalJavascript/ MediaEmbedFilterTestBase.php - MediaOverviewPageTest::setUp in core/
modules/ media/ tests/ src/ Functional/ MediaOverviewPageTest.php
15 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 - MediaEmbedFilterTestBase::setUp in core/
modules/ media/ tests/ src/ FunctionalJavascript/ MediaEmbedFilterTestBase.php - MediaOverviewPageTest::setUp in core/
modules/ media/ tests/ src/ Functional/ MediaOverviewPageTest.php
File
-
core/
modules/ media/ tests/ src/ Functional/ MediaFunctionalTestTrait.php, line 61
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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.