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.test34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/simpletest/tests/form.test b/modules/simpletest/tests/form.test
index 29fb5eb53..d139f4dcb 100644
--- a/modules/simpletest/tests/form.test
+++ b/modules/simpletest/tests/form.test
@@ -1175,3 +1175,37 @@ class FormsArbitraryRebuildTestCase extends DrupalWebTestCase {
$this->assertFieldByName('mail', 'bar@example.com', 'Entered mail address has been kept.');
}
}
+
+/**
+ * Tests form API file inclusion.
+ */
+class FormsFileInclusionTestCase extends DrupalWebTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'Form API file inclusion',
+ 'description' => 'Tests form API file inclusion.',
+ 'group' => 'Form API',
+ );
+ }
+
+ function setUp() {
+ parent::setUp('form_test');
+ }
+
+ /**
+ * Tests loading an include specified in hook_menu().
+ */
+ function testLoadMenuInclude() {
+ $this->drupalPostAJAX('form-test/load-include-menu', array(), array('op' => t('Save')), 'system/ajax', array(), array(), 'form-test-load-include-menu');
+ $this->assertText('Submit callback called.');
+ }
+
+ /**
+ * Tests loading a custom specified inlcude.
+ */
+ function testLoadCustomInclude() {
+ $this->drupalPost('form-test/load-include-custom', array(), t('Save'));
+ $this->assertText('Submit callback called.');
+ }
+}