protected function MediaTest::setUp in Workbench Moderation to Content Moderation 8.2
Overrides TestBase::setUp
File
- tests/
src/ Kernel/ Migration/ MediaTest.php, line 28
Class
- MediaTest
- Tests the save-clear-restore migration flow for media items.
Namespace
Drupal\Tests\wbm2cm\Kernel\MigrationCode
protected function setUp() {
parent::setUp();
$this
->installConfig('media_entity');
$this
->installEntitySchema('file');
$this
->installEntitySchema('media');
$this
->installEntitySchema('user');
$this
->installSchema('file', 'file_usage');
$this->storage = $this->container
->get('entity_type.manager')
->getStorage('media');
MediaBundle::create([
'id' => 'generic',
'label' => $this
->randomMachineName(),
])
->save();
}