Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / user / tests / src / Kernel / UserAdminSettingsFormTest.php
diff --git a/web/core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php b/web/core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php
new file mode 100644 (file)
index 0000000..5f43c28
--- /dev/null
@@ -0,0 +1,56 @@
+<?php
+
+namespace Drupal\Tests\user\Kernel;
+
+use Drupal\KernelTests\ConfigFormTestBase;
+use Drupal\user\AccountSettingsForm;
+
+/**
+ * Configuration object user.mail and user.settings save test.
+ *
+ * @group user
+ */
+class UserAdminSettingsFormTest extends ConfigFormTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['user', 'system'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->form = AccountSettingsForm::create($this->container);
+    $this->values = [
+      'anonymous' => [
+        '#value' => $this->randomString(10),
+        '#config_name' => 'user.settings',
+        '#config_key' => 'anonymous',
+      ],
+      'user_mail_cancel_confirm_body' => [
+        '#value' => $this->randomString(),
+        '#config_name' => 'user.mail',
+        '#config_key' => 'cancel_confirm.body',
+      ],
+      'user_mail_cancel_confirm_subject' => [
+        '#value' => $this->randomString(20),
+        '#config_name' => 'user.mail',
+        '#config_key' => 'cancel_confirm.subject',
+      ],
+      'register_pending_approval_admin_body' => [
+        '#value' => $this->randomString(),
+        '#config_name' => 'user.mail',
+        '#config_key' => 'register_pending_approval_admin.body',
+      ],
+      'register_pending_approval_admin_subject' => [
+        '#value' => $this->randomString(20),
+        '#config_name' => 'user.mail',
+        '#config_key' => 'register_pending_approval_admin.subject',
+      ],
+    ];
+  }
+
+}