You are here

public function Update800180068007Test::testUpdate in Lightning Media 8.4

Tests the update function.

File

modules/lightning_media_image/tests/src/Kernel/Update800180068007Test.php, line 40

Class

Update800180068007Test
Tests Lightning Media Image's update path.

Namespace

Drupal\Tests\lightning_media_image\Kernel

Code

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();
}