Version 1
[yaffs-website] / web / core / modules / image / tests / src / Kernel / Migrate / d7 / MigrateImageSettingsTest.php
diff --git a/web/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php b/web/core/modules/image/tests/src/Kernel/Migrate/d7/MigrateImageSettingsTest.php
new file mode 100644 (file)
index 0000000..b95f0a2
--- /dev/null
@@ -0,0 +1,35 @@
+<?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 {
+
+  public static $modules = ['image'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    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->assertIdentical("core/modules/image/testsample.png", $config->get('preview_image'));
+  }
+
+}