Version 1
[yaffs-website] / web / core / modules / contact / tests / src / Kernel / Migrate / d7 / MigrateContactSettingsTest.php
diff --git a/web/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php b/web/core/modules/contact/tests/src/Kernel/Migrate/d7/MigrateContactSettingsTest.php
new file mode 100644 (file)
index 0000000..22385f0
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\Tests\contact\Kernel\Migrate\d7;
+
+use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
+
+/**
+ * Tests migration of Contact settings to configuration.
+ *
+ * @group migrate_drupal_7
+ */
+class MigrateContactSettingsTest extends MigrateDrupal7TestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['contact'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+    $this->executeMigration('contact_category');
+    $this->executeMigration('d7_contact_settings');
+  }
+
+  /**
+   * Tests migration of Contact's variables to configuration.
+   */
+  public function testContactSettings() {
+    $config = $this->config('contact.settings');
+    $this->assertTrue($config->get('user_default_enabled'));
+    $this->assertIdentical(33, $config->get('flood.limit'));
+    $this->assertEqual('website_testing', $config->get('default_form'));
+  }
+
+}