summaryrefslogtreecommitdiff
path: root/modules/system/system.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.test')
-rw-r--r--modules/system/system.test35
1 files changed, 34 insertions, 1 deletions
diff --git a/modules/system/system.test b/modules/system/system.test
index 42a9d0635..c5a67f9d0 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -218,7 +218,7 @@ class ModuleDependencyTestCase extends ModuleTestCase {
$edit = array();
$edit['modules[Core][translation][enable]'] = 'translation';
$this->drupalPost('admin/modules', $edit, t('Save configuration'));
- $this->assertText(t('Some required modules must be enabled'), t('Dependecy required.'));
+ $this->assertText(t('Some required modules must be enabled'), t('Dependency required.'));
$this->assertModules(array('translation', 'locale'), FALSE);
@@ -285,6 +285,39 @@ class ModuleDependencyTestCase extends ModuleTestCase {
$this->assertModules(array('comment'), TRUE);
}
+
+ /**
+ * Tests re-enabling forum with taxonomy disabled.
+ */
+ function testEnableForumTaxonomyFieldDependency() {
+ // Enable the forum module.
+ $edit = array();
+ $edit['modules[Core][forum][enable]'] = 'forum';
+ $this->drupalPost('admin/modules', $edit, t('Save configuration'));
+ $this->assertModules(array('forum'), TRUE);
+
+ // Disable the forum module.
+ $edit = array();
+ $edit['modules[Core][forum][enable]'] = FALSE;
+ $this->drupalPost('admin/modules', $edit, t('Save configuration'));
+ $this->assertModules(array('forum'), FALSE);
+
+ // Disable the taxonomy module.
+ $edit = array();
+ $edit['modules[Core][taxonomy][enable]'] = FALSE;
+ $this->drupalPost('admin/modules', $edit, t('Save configuration'));
+ $this->assertModules(array('taxonomy'), FALSE);
+
+ // Attempt to re-enable the forum module with taxonomy disabled and ensure
+ // forum does not try to recreate the taxonomy_forums field.
+ $edit = array();
+ $edit['modules[Core][forum][enable]'] = 'forum';
+ $this->drupalPost('admin/modules', $edit, t('Save configuration'));
+ $this->assertText(t('Some required modules must be enabled'), t('Dependency required.'));
+ $this->drupalPost(NULL, NULL, t('Continue'));
+ $this->assertText(t('The configuration options have been saved.'), t('Modules status has been updated.'));
+ $this->assertModules(array('taxonomy', 'forum'), TRUE);
+ }
}
/**