You are here

public function GroupTabTest::testGroupTab in Organic groups 8

Tests the formatter changes by user and membership.

File

tests/src/Functional/GroupTabTest.php, line 107

Class

GroupTabTest
Tests the "Group" tab.

Namespace

Drupal\Tests\og\Functional

Code

public function testGroupTab() {
  $this
    ->drupalLogin($this->user1);
  $this
    ->drupalGet('group/node/' . $this->group
    ->id() . '/admin');
  $this
    ->assertSession()
    ->statusCodeEquals(200);
  $this
    ->drupalGet('group/node/' . $this->nonGroup
    ->id() . '/admin');
  $this
    ->assertSession()
    ->statusCodeEquals(403);
}