You are here

public function GroupContentToEntityRelationshipTest::testOtherContentIsNotListed in Group 2.0.x

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

Tests that any other group content is not returned by the view.

@depends testGroupOwnerIsListed

File

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

Class

GroupContentToEntityRelationshipTest
Tests the group_content_to_entity relationship handler.

Namespace

Drupal\Tests\group\Kernel\Views

Code

public function testOtherContentIsNotListed() {
  $group = $this
    ->createGroup();
  $group
    ->addContent($this
    ->createUser(), 'user_as_content');
  $this
    ->assertEquals(1, count($this
    ->getViewResults()), 'The view only displays the user for default member and not the one that was added as content.');
}