You are here

protected function GroupContentToEntityRelationshipTest::getViewResults 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::getViewResults()

Retrieves the results for this test's view.

Return value

\Drupal\views\ResultRow[] A list of view results.

4 calls to GroupContentToEntityRelationshipTest::getViewResults()
GroupContentToEntityRelationshipTest::testAddedMemberIsListed in tests/src/Kernel/Views/GroupContentToEntityRelationshipTest.php
Tests that an extra group member is returned by the view.
GroupContentToEntityRelationshipTest::testGroupOwnerIsListed in tests/src/Kernel/Views/GroupContentToEntityRelationshipTest.php
Tests that a group's owner (default member) is returned by the view.
GroupContentToEntityRelationshipTest::testOtherContentIsNotListed in tests/src/Kernel/Views/GroupContentToEntityRelationshipTest.php
Tests that any other group content is not returned by the view.
GroupContentToEntityRelationshipTest::testRegularUserIsNotListed in tests/src/Kernel/Views/GroupContentToEntityRelationshipTest.php
Tests that a regular user is not returned by the view.

File

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

Class

GroupContentToEntityRelationshipTest
Tests the group_content_to_entity relationship handler.

Namespace

Drupal\Tests\group\Kernel\Views

Code

protected function getViewResults() {
  $view = Views::getView(reset($this::$testViews));
  $view
    ->setDisplay();
  if ($view
    ->preview()) {
    return $view->result;
  }
  return [];
}