You are here

protected function GroupToGroupContentRelationshipTest::setCurrentUser in Group 8

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

Set the current user so group creation can rely on it.

Parameters

\Drupal\Core\Session\AccountInterface $account: The account to set as the current user.

1 call to GroupToGroupContentRelationshipTest::setCurrentUser()
GroupToGroupContentRelationshipTest::setUp in tests/src/Kernel/Views/GroupToGroupContentRelationshipTest.php

File

tests/src/Kernel/Views/GroupToGroupContentRelationshipTest.php, line 85

Class

GroupToGroupContentRelationshipTest
Tests the group_to_group_content relationship handler.

Namespace

Drupal\Tests\group\Kernel\Views

Code

protected function setCurrentUser(AccountInterface $account) {
  $this->container
    ->get('current_user')
    ->setAccount($account);
}