Tests disabling and re-enabling the Forum module.
function testEnableForumField() {
$this
->drupalLogin($this->admin_user);
// Disable the Forum module.
$edit = array();
$edit['modules[Core][forum][enable]'] = FALSE;
$this
->drupalPost('admin/modules', $edit, t('Save configuration'));
$this
->assertText(t('The configuration options have been saved.'), 'Modules status has been updated.');
system_list_reset();
$this
->assertFalse(module_exists('forum'), 'Forum module is not enabled.');
// Attempt to re-enable the Forum module and ensure it 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('The configuration options have been saved.'), 'Modules status has been updated.');
system_list_reset();
$this
->assertTrue(module_exists('forum'), 'Forum module is enabled.');
}