function MigrateImageCacheTest::testMissingTable

Same name in other branches
  1. 9 core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php \Drupal\Tests\image\Kernel\Migrate\d6\MigrateImageCacheTest::testMissingTable()
  2. 8.9.x core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageCacheTest.php \Drupal\Tests\image\Kernel\Migrate\d6\MigrateImageCacheTest::testMissingTable()
  3. 11.x 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 32

Class

MigrateImageCacheTest
Tests migration of ImageCache presets to image styles.

Namespace

Drupal\Tests\image\Kernel\Migrate\d6

Code

public function testMissingTable() : void {
    $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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.