Version 1
[yaffs-website] / web / core / modules / taxonomy / tests / src / Kernel / Migrate / MigrateTaxonomyConfigsTest.php
diff --git a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/MigrateTaxonomyConfigsTest.php
new file mode 100644 (file)
index 0000000..92ebe59
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\Tests\taxonomy\Kernel\Migrate;
+
+use Drupal\Tests\SchemaCheckTestTrait;
+use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
+
+/**
+ * Upgrade variables to taxonomy.settings.yml.
+ *
+ * @group migrate_drupal_6
+ */
+class MigrateTaxonomyConfigsTest extends MigrateDrupal6TestBase {
+
+  use SchemaCheckTestTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['taxonomy'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->executeMigration('taxonomy_settings');
+  }
+
+  /**
+   * Tests migration of taxonomy variables to taxonomy.settings.yml.
+   */
+  public function testTaxonomySettings() {
+    $config = $this->config('taxonomy.settings');
+    $this->assertIdentical(100, $config->get('terms_per_page_admin'));
+    $this->assertIdentical(FALSE, $config->get('override_selector'));
+    $this->assertConfigSchema(\Drupal::service('config.typed'), 'taxonomy.settings', $config->get());
+  }
+
+}