Version 1
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Form / fixtures / form_base_test.inc
diff --git a/web/core/tests/Drupal/Tests/Core/Form/fixtures/form_base_test.inc b/web/core/tests/Drupal/Tests/Core/Form/fixtures/form_base_test.inc
new file mode 100644 (file)
index 0000000..b7623f7
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @file
+ * Functions in the global namespace for \Drupal\Tests\Core\Form\FormTestBase.
+ */
+
+/**
+ * Creates a test form.
+ *
+ * @return array
+ *   The form array
+ */
+function test_form_id() {
+  $form['test'] = [
+    '#type' => 'textfield',
+    '#title' => 'Test',
+  ];
+  $form['options'] = [
+    '#type' => 'radios',
+    '#options' => [
+      'foo' => 'foo',
+      'bar' => 'bar',
+    ],
+  ];
+  $form['value'] = [
+    '#type' => 'value',
+    '#value' => 'bananas',
+  ];
+  $form['actions'] = [
+    '#type' => 'actions',
+  ];
+  $form['actions']['submit'] = [
+    '#type' => 'submit',
+    '#value' => 'Submit',
+  ];
+  return $form;
+}