function ForumTest::generateForumTopics

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

Generates forum topics.

1 call to ForumTest::generateForumTopics()
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 728

Class

ForumTest
Tests for forum.module.

Namespace

Drupal\Tests\forum\Functional

Code

private function generateForumTopics() {
    $this->nids = [];
    for ($i = 0; $i < 5; $i++) {
        $node = $this->createForumTopic($this->forum, FALSE);
        $this->nids[] = $node->id();
    }
}

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