createForum example

// Add forum to the Tools menu.     $edit = [];
    $this->drupalGet('admin/structure/menu/manage/tools');
    $this->submitForm($edit, 'Save');
    $this->assertSession()->statusCodeEquals(200);

    // Edit forum taxonomy.     // Restoration of the settings fails and causes subsequent tests to fail.     $this->editForumVocabulary();
    // Create forum container.     $this->forumContainer = $this->createForum('container');
    // Verify "edit container" link exists and functions correctly.     $this->drupalGet('admin/structure/forum');
    // Verify help text is shown.     $this->assertSession()->pageTextContains('Forums contain forum topics. Use containers to group related forums');
    // Verify action links are there.     $this->assertSession()->linkExists('Add forum');
    $this->assertSession()->linkExists('Add container');
    $this->clickLink('edit container');
    $this->assertSession()->pageTextContains('Edit container');
    // Create forum inside the forum container.     $this->forum = $this->createForum('forum', $this->forumContainer['tid']);
    
Home | Imprint | This part of the site doesn't use cookies.