MigrateImageSettingsTest.php

Same filename in other branches
  1. 8.9.x core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
  2. 10 core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
  3. 11.x core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php

Namespace

Drupal\Tests\image\Kernel\Migrate\d7

File

core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php

View source
<?php

namespace Drupal\Tests\image\Kernel\Migrate\d7;

use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;

/**
 * Tests migration of Image variables to configuration.
 *
 * @group image
 */
class MigrateImageSettingsTest extends MigrateDrupal7TestBase {
    protected static $modules = [
        'image',
    ];
    
    /**
     * {@inheritdoc}
     */
    protected function setUp() : void {
        parent::setUp();
        $this->executeMigration('d7_image_settings');
    }
    
    /**
     * Tests the migration.
     */
    public function testMigration() {
        $config = $this->config('image.settings');
        // These settings are not recommended...
        $this->assertTrue($config->get('allow_insecure_derivatives'));
        $this->assertTrue($config->get('suppress_itok_output'));
        $this->assertSame("core/modules/image/testsample.png", $config->get('preview_image'));
    }

}

Classes

Title Deprecated Summary
MigrateImageSettingsTest Tests migration of Image variables to configuration.

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