You are here

Update8201Test.php in Image Effects 8.2

File

tests/src/Functional/Update/Update8201Test.php
View source
<?php

namespace Drupal\Tests\image_effects\Functional\Update;

use Drupal\FunctionalTests\Update\UpdatePathTestBase;

/**
 * Tests the upgrade path for enabling file_mdm and its submodules.
 *
 * @group Image Effects
 */
class Update8201Test extends UpdatePathTestBase {

  /**
   * {@inheritdoc}
   */
  protected function setDatabaseDumpFiles() {
    $this->databaseDumpFiles = [
      __DIR__ . '/../../../fixtures/update/d834_ie810.php.gz',
    ];
  }

  /**
   * Tests that the file_mdm module enable is executed correctly.
   */
  public function testModuleWeightUpdate() {
    $this
      ->assertFalse(\Drupal::moduleHandler()
      ->moduleExists('file_mdm'));
    $this
      ->assertFalse(\Drupal::moduleHandler()
      ->moduleExists('file_mdm_exif'));
    $this
      ->assertFalse(\Drupal::moduleHandler()
      ->moduleExists('file_mdm_font'));
    $this
      ->runUpdates();
    $this
      ->assertTrue(\Drupal::moduleHandler()
      ->moduleExists('file_mdm'));
    $this
      ->assertTrue(\Drupal::moduleHandler()
      ->moduleExists('file_mdm_exif'));
    $this
      ->assertTrue(\Drupal::moduleHandler()
      ->moduleExists('file_mdm_font'));
  }

}

Classes

Namesort descending Description
Update8201Test Tests the upgrade path for enabling file_mdm and its submodules.