protected function OgRoleCacheContextTestTrait::getContextResult in Organic groups 8
Return the context result.
Return value
string The context result.
5 calls to OgRoleCacheContextTestTrait::getContextResult()
- OgRoleCacheContextTest::testMemberships in tests/
src/ Kernel/ Cache/ Context/ OgRoleCacheContextTest.php - Tests that the correct cache context key is returned for group members.
- OgRoleCacheContextTest::testMembershipsNoSql in tests/
src/ Unit/ Cache/ Context/ OgRoleCacheContextTest.php - Tests that the correct cache context key is returned for group members.
- OgRoleCacheContextTest::testMembershipsWithOrphanedRole in tests/
src/ Unit/ Cache/ Context/ OgRoleCacheContextTest.php - Tests that no cache context key is returned if a user has lost membership.
- OgRoleCacheContextTest::testNoMemberships in tests/
src/ Unit/ Cache/ Context/ OgRoleCacheContextTest.php - Tests generating of a cache context key for a user with no memberships.
- OgRoleCacheContextTest::testNoMemberships in tests/
src/ Kernel/ Cache/ Context/ OgRoleCacheContextTest.php - Tests generating of a cache context key for a user with no memberships.
File
- tests/
src/ Traits/ OgRoleCacheContextTestTrait.php, line 23
Class
- OgRoleCacheContextTestTrait
- Provides functionality shared between tests for the OgRoleCacheContext.
Namespace
Drupal\Tests\og\TraitsCode
protected function getContextResult(AccountInterface $user = NULL) : string {
return $this
->getCacheContext($user)
->getContext();
}