protected function MediaBulkFormTest::setUp in Media Entity Actions 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/MediaEntityActionsBulkFormTest.php \Drupal\Tests\media_entity_actions\Functional\MediaBulkFormTest::setUp()
Overrides MediaFunctionalTestTrait::setUp
File
- tests/
src/ Functional/ MediaEntityActionsBulkFormTest.php, line 40
Class
- MediaBulkFormTest
- Tests a media bulk form.
Namespace
Drupal\Tests\media_entity_actions\FunctionalCode
protected function setUp() {
parent::setUp();
$this->testMediaType = $this
->createMediaType();
// 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;
}
}