public function GroupContentToEntityRelationshipTest::testOtherContentIsNotListed in Group 8
Same name and namespace in other branches
- 2.0.x 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\ViewsCode
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.');
}