You are here

public function GroupContentToEntityRelationshipTest::testAddedMemberIsListed in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Kernel/Views/GroupContentToEntityRelationshipTest.php \Drupal\Tests\group\Kernel\Views\GroupContentToEntityRelationshipTest::testAddedMemberIsListed()

Tests that an extra group member is returned by the view.

@depends testGroupOwnerIsListed

File

tests/src/Kernel/Views/GroupContentToEntityRelationshipTest.php, line 150

Class

GroupContentToEntityRelationshipTest
Tests the group_content_to_entity relationship handler.

Namespace

Drupal\Tests\group\Kernel\Views

Code

public function testAddedMemberIsListed() {
  $group = $this
    ->createGroup();
  $group
    ->addMember($this
    ->createUser());
  $this
    ->assertEquals(2, count($this
    ->getViewResults()), 'The view displays the users for both the default and the added member.');
}