function MediaBulkFormTest::setUp
Same name in other branches
- 9 core/modules/media/tests/src/Functional/MediaBulkFormTest.php \Drupal\Tests\media\Functional\MediaBulkFormTest::setUp()
- 8.9.x core/modules/media/tests/src/Functional/MediaBulkFormTest.php \Drupal\Tests\media\Functional\MediaBulkFormTest::setUp()
- 11.x core/modules/media/tests/src/Functional/MediaBulkFormTest.php \Drupal\Tests\media\Functional\MediaBulkFormTest::setUp()
Overrides MediaFunctionalTestTrait::setUp
File
-
core/
modules/ media/ tests/ src/ Functional/ MediaBulkFormTest.php, line 46
Class
- MediaBulkFormTest
- Tests a media bulk form.
Namespace
Drupal\Tests\media\FunctionalCode
protected function setUp() : void {
parent::setUp();
$this->testMediaType = $this->createMediaType('test');
// Create some test media items.
$this->mediaItems = [];
for ($i = 1; $i <= 5; $i++) {
$media = Media::create([
'bundle' => $this->testMediaType
->id(),
]);
$media->save();
$this->mediaItems[] = $media;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.