You are here

public function MigrateImageCacheTest::testMissingTable in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php \Drupal\Tests\image\Kernel\Migrate\d6\MigrateImageCacheTest::testMissingTable()
  2. 10 core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php \Drupal\Tests\image\Kernel\Migrate\d6\MigrateImageCacheTest::testMissingTable()

Tests that an exception is thrown when ImageCache is not installed.

File

core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php, line 29

Class

MigrateImageCacheTest
Tests migration of ImageCache presets to image styles.

Namespace

Drupal\Tests\image\Kernel\Migrate\d6

Code

public function testMissingTable() {
  $this->sourceDatabase
    ->update('system')
    ->fields([
    'status' => 0,
  ])
    ->condition('name', 'imagecache')
    ->condition('type', 'module')
    ->execute();
  $this
    ->expectException(RequirementsException::class);
  $this
    ->getMigration('d6_imagecache_presets')
    ->getSourcePlugin()
    ->checkRequirements();
}