Update800180068007Test.php in Lightning Media 8.4
File
modules/lightning_media_image/tests/src/Kernel/Update800180068007Test.php
View source
<?php
namespace Drupal\Tests\lightning_media_image\Kernel;
use Drupal\Core\Entity\Entity\EntityFormMode;
use Drupal\Core\Entity\Entity\EntityViewMode;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\KernelTests\KernelTestBase;
use Drupal\Tests\media\Traits\MediaTypeCreationTrait;
class Update800180068007Test extends KernelTestBase {
use MediaTypeCreationTrait;
protected static $modules = [
'field',
'image',
'lightning_media',
'lightning_media_image',
'media',
'media_test_source',
];
public function testUpdate() {
FieldStorageConfig::create([
'type' => 'boolean',
'entity_type' => 'media',
'field_name' => 'field_media_in_library',
])
->save();
$this
->createMediaType('test', [
'id' => 'image',
]);
EntityFormMode::create([
'targetEntityType' => 'media',
'id' => 'media.media_library',
])
->save();
EntityFormMode::create([
'targetEntityType' => 'media',
'id' => 'media.media_browser',
])
->save();
EntityViewMode::create([
'targetEntityType' => 'media',
'id' => 'media.thumbnail',
])
->save();
module_load_install('lightning_media_image');
lightning_media_image_update_8001();
lightning_media_image_update_8006();
lightning_media_image_update_8007();
}
}