You are here

private function ForumTestCase::verifyForumView in Drupal 7

Verifies display of forum page.

Parameters

$forum: A row from the taxonomy_term_data table in an array.

$parent: (optional) An array representing the forum's parent.

1 call to ForumTestCase::verifyForumView()
ForumTestCase::verifyForums in modules/forum/forum.test
Verifies that the logged in user has access to a forum nodes.

File

modules/forum/forum.test, line 574
Tests for forum.module.

Class

ForumTestCase
Provides automated tests for the Forum module.

Code

private function verifyForumView($forum, $parent = NULL) {

  // View forum page.
  $this
    ->drupalGet('forum/' . $forum['tid']);
  $this
    ->assertResponse(200);
  $this
    ->assertTitle($forum['name'] . ' | Drupal', 'Forum name was displayed');
  $breadcrumb = array(
    l(t('Home'), NULL),
    l(t('Forums'), 'forum'),
  );
  if (isset($parent)) {
    $breadcrumb[] = l($parent['name'], 'forum/' . $parent['tid']);
  }
  $this
    ->assertRaw(theme('breadcrumb', array(
    'breadcrumb' => $breadcrumb,
  )), 'Breadcrumbs were displayed');
}