Update80018002Test.php in Lightning Media 8.4
File
modules/lightning_media_document/tests/src/Kernel/Update80018002Test.php
View source
<?php
namespace Drupal\Tests\lightning_media_document\Kernel;
use Drupal\Core\Entity\Entity\EntityFormMode;
use Drupal\Core\Entity\Entity\EntityViewMode;
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\media\Traits\MediaTypeCreationTrait;
class Update80018002Test extends KernelTestBase {
use MediaTypeCreationTrait;
protected static $modules = [
'field',
'image',
'lightning_media_document',
'media',
'media_test_source',
];
public function testUpdate() {
$this
->createMediaType('test', [
'id' => 'document',
]);
EntityViewMode::create([
'targetEntityType' => 'media',
'id' => 'media.thumbnail',
])
->save();
EntityFormMode::create([
'targetEntityType' => 'media',
'id' => 'media.media_library',
])
->save();
module_load_install('lightning_media_document');
lightning_media_document_update_8001();
lightning_media_document_update_8002();
}
}