verifyForums example

    // content.     $this->doBasicTests($this->editAnyTopicsUser, TRUE);
    // Create a forum node authored by this user.     $any_topics_user_node = $this->createForumTopic($this->forum, FALSE);

    // Log in, and do basic tests for a user with permission to edit only its     // own forum content.     $this->doBasicTests($this->editOwnTopicsUser, FALSE);
    // Create a forum node authored by this user.     $own_topics_user_node = $this->createForumTopic($this->forum, FALSE);
    // Verify that this user cannot edit forum content authored by another user.     $this->verifyForums($any_topics_user_node, FALSE, 403);

    // Verify that this user is shown a local task to add new forum content.     $this->drupalGet('forum');
    $this->assertSession()->linkExists('Add new Forum topic');
    $this->drupalGet('forum/' . $this->forum['tid']);
    $this->assertSession()->linkExists('Add new Forum topic');

    // Log in a user with permission to edit any forum content.     $this->drupalLogin($this->editAnyTopicsUser);
    // Verify that this user can edit forum content authored by another user.     $this->verifyForums($own_topics_user_node, TRUE);

    
Home | Imprint | This part of the site doesn't use cookies.