protected function GroupKernelTestBase::getCurrentUser in Group 2.0.x
Same name and namespace in other branches
- 8 tests/src/Kernel/GroupKernelTestBase.php \Drupal\Tests\group\Kernel\GroupKernelTestBase::getCurrentUser()
Gets the current user so you can run some checks against them.
Return value
\Drupal\Core\Session\AccountInterface The current user.
47 calls to GroupKernelTestBase::getCurrentUser()
- EntityAccessComplexTest::testMemberDeleteAnyAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the deleting of any grouped entities for members.
- EntityAccessComplexTest::testMemberDeleteOwnAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the deleting of own grouped entities for members.
- EntityAccessComplexTest::testMemberGroupAccessWithoutPermission in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests that grouped nodes are properly hidden.
- EntityAccessComplexTest::testMemberGroupAccessWithPermission in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests that grouped nodes are visible to members.
- EntityAccessComplexTest::testMemberUpdateAnyAccess in tests/
src/ Kernel/ EntityAccessComplexTest.php - Tests the updating of any grouped entities for members.
File
- tests/
src/ Kernel/ GroupKernelTestBase.php, line 51
Class
- GroupKernelTestBase
- Defines an abstract test base for group kernel tests.
Namespace
Drupal\Tests\group\KernelCode
protected function getCurrentUser() {
return $this->container
->get('current_user')
->getAccount();
}