protected function MediaBulkFormTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/media/tests/src/Functional/MediaBulkFormTest.php \Drupal\Tests\media\Functional\MediaBulkFormTest::setUp()
- 9 core/modules/media/tests/src/Functional/MediaBulkFormTest.php \Drupal\Tests\media\Functional\MediaBulkFormTest::setUp()
File
- core/
modules/ media/ tests/ src/ Functional/ MediaBulkFormTest.php, line 44
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;
}
}