summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/form.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/form.test')
-rw-r--r--modules/simpletest/tests/form.test27
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 6ea494c3d..5ee6252c1 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -449,3 +449,30 @@ class FormsFormStorageTestCase extends DrupalWebTestCase {
$this->assertPattern('/value_is_set/', t("The input values have been kept."));
}
}
+
+/**
+ * Test wrapper form callbacks.
+ */
+class FormsFormWrapperTestCase extends DrupalWebTestCase {
+ public static function getInfo() {
+ return array(
+ 'name' => 'Form wrapper callback',
+ 'description' => 'Tests form wrapper callbacks to pass a prebuilt form to form builder functions.',
+ 'group' => 'Form API',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('form_test');
+ }
+
+ /**
+ * Tests using the form in a usual way.
+ */
+ function testWrapperCallback() {
+ $this->drupalGet('form_test/wrapper-callback');
+ $this->assertText('Form wrapper callback element output.', t('The form contains form wrapper elements.'));
+ $this->assertText('Form builder element output.', t('The form contains form builder elements.'));
+ }
+}
+