Version 1
[yaffs-website] / web / core / modules / locale / tests / src / Kernel / Migrate / MigrateLocaleConfigsTest.php
diff --git a/web/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php b/web/core/modules/locale/tests/src/Kernel/Migrate/MigrateLocaleConfigsTest.php
new file mode 100644 (file)
index 0000000..b444918
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\Tests\locale\Kernel\Migrate;
+
+use Drupal\Tests\SchemaCheckTestTrait;
+use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
+
+/**
+ * Upgrade variables to locale.settings.yml.
+ *
+ * @group migrate_drupal_6
+ */
+class MigrateLocaleConfigsTest extends MigrateDrupal6TestBase {
+
+  use SchemaCheckTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['locale', 'language'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->executeMigration('locale_settings');
+  }
+
+  /**
+   * Tests migration of locale variables to locale.settings.yml.
+   */
+  public function testLocaleSettings() {
+    $config = $this->config('locale.settings');
+    $this->assertIdentical(TRUE, $config->get('cache_strings'));
+    $this->assertIdentical('languages', $config->get('javascript.directory'));
+    $this->assertConfigSchema(\Drupal::service('config.typed'), 'locale.settings', $config->get());
+  }
+
+}