diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-11 03:07:21 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-10-11 03:07:21 +0000 |
commit | b3265dbe174ce0efefa181b8af6c1eaea3ff22c2 (patch) | |
tree | aa7e8b709c162fd781748d8bebaa12c75727e01e /modules/forum/forum.test | |
parent | 64a1a0d67eb5aecc8e6d78469b19f58e8443c717 (diff) | |
download | brdo-b3265dbe174ce0efefa181b8af6c1eaea3ff22c2.tar.gz brdo-b3265dbe174ce0efefa181b8af6c1eaea3ff22c2.tar.bz2 |
#557292 by peximo, plach, catch, and yched: Convert node title to Field API.
Diffstat (limited to 'modules/forum/forum.test')
-rw-r--r-- | modules/forum/forum.test | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/forum/forum.test b/modules/forum/forum.test index 4496949b9..28995361f 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -248,7 +248,7 @@ class ForumTestCase extends DrupalWebTestCase { $langcode = FIELD_LANGUAGE_NONE; $edit = array( - 'title' => $title, + "title[$langcode][0][value]" => $title, "body[$langcode][0][value]" => $body, "taxonomy_forums[$langcode][value]" => $tid, ); @@ -323,27 +323,27 @@ class ForumTestCase extends DrupalWebTestCase { // View forum node. $this->drupalGet('node/' . $node->nid); $this->assertResponse(200); - $this->assertTitle($node->title . ' | Drupal', t('Forum node was displayed')); + $this->assertTitle($node->title[FIELD_LANGUAGE_NONE][0]['value'] . ' | 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->assertResponse($response); if ($response == 200) { - $this->assertTitle('Edit Forum topic ' . $node->title . ' | Drupal', t('Forum edit node was displayed')); + $this->assertTitle('Edit Forum topic ' . $node->title[FIELD_LANGUAGE_NONE][0]['value'] . ' | Drupal', t('Forum edit node was displayed')); } if ($response == 200) { // Edit forum node (including moving it to another forum). $edit = array(); - $edit['title'] = 'node/' . $node->nid; $langcode = FIELD_LANGUAGE_NONE; + $edit["title[$langcode][0][value]"] = 'node/' . $node->nid; $edit["body[$langcode][0][value]"] = $this->randomName(256); // Assume the topic is initially associated with $forum. $edit["taxonomy_forums[$langcode][value]"] = $this->root_forum['tid']; $edit['shadow'] = TRUE; $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')); + $this->assertRaw(t('Forum topic %title has been updated.', array('%title' => $edit["title[$langcode][0][value]"])), t('Forum node was edited')); // Verify topic was moved to a different forum. $forum_tid = db_query("SELECT tid FROM {forum} WHERE nid = :nid AND vid = :vid", array( @@ -355,7 +355,7 @@ class ForumTestCase extends DrupalWebTestCase { // Delete forum node. $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')); + $this->assertRaw(t('Forum topic %title has been deleted.', array('%title' => $edit["title[$langcode][0][value]"])), t('Forum node was deleted')); } } |