summaryrefslogtreecommitdiff
path: root/modules/forum/forum.test
diff options
context:
space:
mode:
Diffstat (limited to 'modules/forum/forum.test')
-rw-r--r--modules/forum/forum.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index b8e9136c0..95f0ccbfe 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -103,6 +103,10 @@ class ForumTestCase extends DrupalWebTestCase {
$this->container = $this->createForum('container');
// Create forum inside the forum container.
$this->forum = $this->createForum('forum', $this->container['tid']);
+ // Create second forum in container.
+ $this->delete_forum = $this->createForum('forum', $this->container['tid']);
+ // Delete this second form.
+ $this->deleteForum($this->delete_forum['tid']);
// Create forum at the top (root) level.
$this->root_forum = $this->createForum('forum');
}
@@ -182,6 +186,21 @@ class ForumTestCase extends DrupalWebTestCase {
}
/**
+ * Delete a forum.
+ *
+ * @param integer $tid Forum id.
+ */
+ function deleteForum($tid) {
+ // Delete the forum id.
+ $this->drupalPost('admin/build/forum/edit/forum/'. $tid, array(), t('Delete'));
+ $this->drupalPost(NULL, NULL, t('Delete'));
+
+ // Assert that the forum no longer exists.
+ $this->drupalGet('forum/'. $tid);
+ $this->assertRaw(t('No forums defined'), 'The forum was not found');
+ }
+
+ /**
* Run basic tests on the indicated user.
*
* @param object $user The logged in user.