summaryrefslogtreecommitdiff
path: root/modules/forum/forum.test
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-05-30 07:30:53 +0000
committerDries Buytaert <dries@buytaert.net>2008-05-30 07:30:53 +0000
commitc6c26b5e230b5225ea8a355b6e7a7b31096f7cb3 (patch)
tree18f49ddd773f033ed75eba1fa70dc55de1952f55 /modules/forum/forum.test
parentbc5f69a333af204f8e6c6494d85c96b2da1e1c51 (diff)
downloadbrdo-c6c26b5e230b5225ea8a355b6e7a7b31096f7cb3.tar.gz
brdo-c6c26b5e230b5225ea8a355b6e7a7b31096f7cb3.tar.bz2
- Patch #247423 by boombatower: code style fixes for the tests.
Diffstat (limited to 'modules/forum/forum.test')
-rw-r--r--modules/forum/forum.test50
1 files changed, 25 insertions, 25 deletions
diff --git a/modules/forum/forum.test b/modules/forum/forum.test
index a92fa190a..8988e6d0f 100644
--- a/modules/forum/forum.test
+++ b/modules/forum/forum.test
@@ -96,7 +96,7 @@ class ForumTestCase extends DrupalWebTestCase {
// Add forum to navigation menu.
$edit = array();
- $edit['mlid:'. $mlid .'[hidden]'] = TRUE;
+ $edit['mlid:' . $mlid . '[hidden]'] = TRUE;
$this->drupalPost('admin/build/menu-customize/navigation', $edit, t('Save configuration'));
$this->assertResponse(200);
@@ -134,7 +134,7 @@ class ForumTestCase extends DrupalWebTestCase {
);
// Edit the vocabulary.
- $this->drupalPost('admin/content/taxonomy/edit/vocabulary/'. $vid, $edit, t('Save'));
+ $this->drupalPost('admin/content/taxonomy/edit/vocabulary/' . $vid, $edit, t('Save'));
$this->assertResponse(200);
$this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary was edited'));
@@ -158,7 +158,7 @@ class ForumTestCase extends DrupalWebTestCase {
);
// Edit the vocabulary.
- $this->drupalPost('admin/content/taxonomy/edit/vocabulary/'. $vid, $edit, t('Save'));
+ $this->drupalPost('admin/content/taxonomy/edit/vocabulary/' . $vid, $edit, t('Save'));
$this->assertResponse(200);
$this->assertRaw(t('Updated vocabulary %name.', array('%name' => $title)), t('Vocabulary was edited'));
/*
@@ -191,19 +191,19 @@ class ForumTestCase extends DrupalWebTestCase {
);
// Create forum.
- $this->drupalPost('admin/content/forum/add/'. $type, $edit, t('Save'));
+ $this->drupalPost('admin/content/forum/add/' . $type, $edit, t('Save'));
$this->assertResponse(200);
$type = ($type == 'container') ? 'forum container' : 'forum';
- $this->assertRaw(t('Created new @type %term.', array('%term' => $name, '@type' => t($type))), t(ucfirst($type) .' was created'));
+ $this->assertRaw(t('Created new @type %term.', array('%term' => $name, '@type' => t($type))), t(ucfirst($type) . ' was created'));
// Verify forum.
$term = db_fetch_array(db_query("SELECT * FROM {term_data} t WHERE t.vid = %d AND t.name = '%s' AND t.description = '%s'", variable_get('forum_nav_vocabulary', ''), $name, $description));
- $this->assertTrue(!empty($term), 'The '. $type .' exists in the database');
+ $this->assertTrue(!empty($term), 'The ' . $type . ' exists in the database');
// Verify forum hierarchy.
$tid = $term['tid'];
$parent_tid = db_result(db_query("SELECT t.parent FROM {term_hierarchy} t WHERE t.tid = %d", $tid));
- $this->assertTrue($parent == $parent_tid, 'The '. $type .' is linked to its container');
+ $this->assertTrue($parent == $parent_tid, 'The ' . $type . ' is linked to its container');
return $term;
}
@@ -249,7 +249,7 @@ class ForumTestCase extends DrupalWebTestCase {
// Instead, the post variables seem to pick up the first non-blank value in the select list.
// Create forum topic.
-// $this->drupalPost('node/add/forum/'. $forum['tid'], $edit, t('Save'));
+// $this->drupalPost('node/add/forum/' . $forum['tid'], $edit, t('Save'));
$this->drupalPost('node/add/forum/', $edit, t('Save'));
$type = t('Forum topic');
if ($container) {
@@ -267,7 +267,7 @@ class ForumTestCase extends DrupalWebTestCase {
$this->assertTrue($node != null, t('Node @title was loaded', array('@title' => $title)));
// View forum topic.
- $this->drupalGet('node/'. $node->nid);
+ $this->drupalGet('node/' . $node->nid);
$this->assertRaw($title, t('Subject was found'));
$this->assertRaw($body, t('Body was found'));
@@ -294,7 +294,7 @@ class ForumTestCase extends DrupalWebTestCase {
if ($response2 == 200) {
$this->assertTitle(t('Forum | Drupal'), t('Forum help node was displayed'));
$this->assertText(t('Forum'), t('Forum help node was displayed'));
- $this->assertText(t('Home '. $crumb .' Administer '. $crumb .' Help'), t('Breadcrumbs were displayed'));
+ $this->assertText(t('Home ' . $crumb . ' Administer ' . $crumb . ' Help'), t('Breadcrumbs were displayed'));
}
// Verify the forum blocks were displayed.
@@ -312,17 +312,17 @@ class ForumTestCase extends DrupalWebTestCase {
$this->verifyForumView($this->root_forum);
// View forum node.
- $this->drupalGet('node/'. $node->nid);
+ $this->drupalGet('node/' . $node->nid);
$this->assertResponse(200);
- $this->assertTitle($node->title .' | Drupal', t('Forum node was displayed'));
- $this->assertText(t('Home '. $crumb .' Forums '. $crumb .' @container '. $crumb .' @forum', array('@container' => $this->container['name'], '@forum' => $this->forum['name'])), t('Breadcrumbs were displayed'));
+ $this->assertTitle($node->title . ' | Drupal', t('Forum node was displayed'));
+ $this->assertText(t('Home ' . $crumb . ' Forums ' . $crumb . ' @container ' . $crumb . ' @forum', array('@container' => $this->container['name'], '@forum' => $this->forum['name'])), t('Breadcrumbs were displayed'));
// View forum edit node.
- $this->drupalGet('node/'. $node->nid .'/edit');
+ $this->drupalGet('node/' . $node->nid . '/edit');
$this->assertResponse($response);
if ($response == 200) {
- $this->assertTitle($node->title .' | Drupal', t('Forum edit node was displayed'));
- $this->assertText(t('Home '. $crumb .' @title', array('@title' => $node->title)), t('Breadcrumbs were displayed'));
+ $this->assertTitle($node->title . ' | Drupal', t('Forum edit node was displayed'));
+ $this->assertText(t('Home ' . $crumb . ' @title', array('@title' => $node->title)), t('Breadcrumbs were displayed'));
}
if ($response == 200) {
@@ -332,7 +332,7 @@ class ForumTestCase extends DrupalWebTestCase {
$edit['body'] = $this->randomName(256);
$edit['taxonomy[1]'] = $this->root_forum['tid']; // Assumes the topic is initially associated with $forum.
$edit['shadow'] = TRUE;
- $this->drupalPost('node/'. $node->nid .'/edit', $edit, t('Save'));
+ $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
$this->assertRaw(t('Forum topic %title has been updated.', array('%title' => $edit['title'])), t('Forum node was edited'));
// Verify topic was moved to a different forum.
@@ -340,7 +340,7 @@ class ForumTestCase extends DrupalWebTestCase {
$this->assertTrue($forum_tid == $this->root_forum['tid'], 'The forum topic is linked to a different forum');
// Delete forum node.
- $this->drupalPost('node/'. $node->nid .'/delete', array(), t('Delete'));
+ $this->drupalPost('node/' . $node->nid . '/delete', array(), t('Delete'));
$this->assertResponse($response);
$this->assertRaw(t('Forum topic %title has been deleted.', array('%title' => $edit['title'])), t('Forum node was deleted'));
}
@@ -355,14 +355,14 @@ class ForumTestCase extends DrupalWebTestCase {
$crumb = '›';
// View forum page.
- $this->drupalGet('forum/'. $forum['tid']);
+ $this->drupalGet('forum/' . $forum['tid']);
$this->assertResponse(200);
- $this->assertTitle($forum['name'] .' | Drupal', t('Forum node was displayed'));
+ $this->assertTitle($forum['name'] . ' | Drupal', t('Forum node was displayed'));
if (isset($parent)) {
- $this->assertText(t('Home '. $crumb .' Forums '. $crumb .' @name', array('@name' => $parent['name'])), t('Breadcrumbs were displayed'));
+ $this->assertText(t('Home ' . $crumb . ' Forums ' . $crumb . ' @name', array('@name' => $parent['name'])), t('Breadcrumbs were displayed'));
}
else {
- $this->assertText(t('Home '. $crumb .' Forums'), t('Breadcrumbs were displayed'));
+ $this->assertText(t('Home ' . $crumb . ' Forums'), t('Breadcrumbs were displayed'));
}
}
@@ -389,9 +389,9 @@ class ForumTestCase extends DrupalWebTestCase {
for ($i = 0; $i < 2; $i++) {
foreach ($nids as $nid) {
- $this->drupalGet('node/'. $nid);
- $this->drupalGet('node/'. $nid);
- $this->drupalGet('node/'. $nid);
+ $this->drupalGet('node/' . $nid);
+ $this->drupalGet('node/' . $nid);
+ $this->drupalGet('node/' . $nid);
}
}
}