function ForumTest::doBasicTests

Same name and namespace in other branches
  1. 8.9.x core/modules/forum/tests/src/Functional/ForumTest.php \Drupal\Tests\forum\Functional\ForumTest::doBasicTests()
  2. 10 core/modules/forum/tests/src/Functional/ForumTest.php \Drupal\Tests\forum\Functional\ForumTest::doBasicTests()
  3. 11.x core/modules/forum/tests/src/Functional/ForumTest.php \Drupal\Tests\forum\Functional\ForumTest::doBasicTests()

Runs basic tests on the indicated user.

Parameters

\Drupal\Core\Session\AccountInterface $user: The logged in user.

bool $admin: User has 'access administration pages' privilege.

1 call to ForumTest::doBasicTests()
ForumTest::testForum in core/modules/forum/tests/src/Functional/ForumTest.php
Tests forum functionality through the admin and user interfaces.

File

core/modules/forum/tests/src/Functional/ForumTest.php, line 508

Class

ForumTest
Tests for <a href="/api/drupal/core%21modules%21forum%21forum.module/9" title="Provides discussion forums." class="local">forum.module</a>.

Namespace

Drupal\Tests\forum\Functional

Code

private function doBasicTests($user, $admin) {
    // Log in the user.
    $this->drupalLogin($user);
    // Attempt to create forum topic under a container.
    $this->createForumTopic($this->forumContainer, TRUE);
    // Create forum node.
    $node = $this->createForumTopic($this->forum, FALSE);
    // Verify the user has access to all the forum nodes.
    $this->verifyForums($node, $admin);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.