protected function OpignoCertificateTest::setCurrentUser in Opigno certificate 8
Same name and namespace in other branches
- 3.x tests/src/Kernel/OpignoCertificateTest.php \Drupal\Tests\opigno_certificate\Kernel\OpignoCertificateTest::setCurrentUser()
Sets the current user so group creation can rely on it.
Parameters
\Drupal\Core\Session\AccountInterface $account: The account to set as the current user.
File
- tests/
src/ Kernel/ OpignoCertificateTest.php, line 80
Class
- OpignoCertificateTest
- Tests the general behavior of opigno_certificate entities.
Namespace
Drupal\Tests\opigno_certificate\KernelCode
protected function setCurrentUser(AccountInterface $account) {
$this->container
->get('current_user')
->setAccount($account);
}