private function ForumTest::verifyForumView

Verifies the display of a 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 ForumTest::verifyForumView()
ForumTest::verifyForums in drupal/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php
Verifies that the logged in user has access to a forum node.

File

drupal/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php, line 578
Tests for forum.module.

Class

ForumTest
Provides automated tests for the Forum module.

Namespace

Drupal\forum\Tests

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');
}