You are here

protected function SelectionHandlerTest::setCurrentAccount in Organic groups 8

Sets the current account.

Parameters

\Drupal\Core\Session\AccountInterface $account: The account to switch to.

1 call to SelectionHandlerTest::setCurrentAccount()
SelectionHandlerTest::testSelectionHandlerResults in tests/src/Kernel/Entity/SelectionHandlerTest.php
Testing OG selection handler results.

File

tests/src/Kernel/Entity/SelectionHandlerTest.php, line 219

Class

SelectionHandlerTest
Tests entity reference selection plugins.

Namespace

Drupal\Tests\og\Kernel\Entity

Code

protected function setCurrentAccount(AccountInterface $account) {
  $this->container
    ->get('account_switcher')
    ->switchTo($account);
}