Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / src / Functional / Form / SystemConfigFormTest.php
diff --git a/web/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php b/web/core/modules/system/tests/src/Functional/Form/SystemConfigFormTest.php
new file mode 100644 (file)
index 0000000..09ad06a
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace Drupal\Tests\system\Functional\Form;
+
+use Drupal\Tests\BrowserTestBase;
+
+/**
+ * Tests the SystemConfigFormTestBase class.
+ *
+ * @group Form
+ */
+class SystemConfigFormTest extends BrowserTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['form_test'];
+
+  /**
+   * Tests the SystemConfigFormTestBase class.
+   */
+  public function testSystemConfigForm() {
+    $this->drupalGet('form-test/system-config-form');
+    $element = $this->xpath('//div[@id = :id]/input[contains(@class, :class)]', [':id' => 'edit-actions', ':class' => 'button--primary']);
+    $this->assertTrue($element, 'The primary action submit button was found.');
+    $this->drupalPostForm(NULL, [], t('Save configuration'));
+    $this->assertText(t('The configuration options have been saved.'));
+  }
+
+}