You are here

protected function OpignoCertificateTest::getCurrentUser in Opigno certificate 8

Same name and namespace in other branches
  1. 3.x tests/src/Kernel/OpignoCertificateTest.php \Drupal\Tests\opigno_certificate\Kernel\OpignoCertificateTest::getCurrentUser()

Gets the current user so you can run some checks against them.

Return value

\Drupal\Core\Session\AccountInterface The current user.

File

tests/src/Kernel/OpignoCertificateTest.php, line 90

Class

OpignoCertificateTest
Tests the general behavior of opigno_certificate entities.

Namespace

Drupal\Tests\opigno_certificate\Kernel

Code

protected function getCurrentUser() {
  return $this->container
    ->get('current_user')
    ->getAccount();
}