protected function CommentViewAccessTest::setUpCurrentUser in Open Social 10.2.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_comment/tests/src/Kernel/CommentViewAccessTest.php \Drupal\Tests\social_comment\Kernel\CommentViewAccessTest::setUpCurrentUser()
Until https://www.drupal.org/project/drupal/issues/3039955 is fixed.
4 calls to CommentViewAccessTest::setUpCurrentUser()
- CommentViewAccessTest::testUserCanNotViewCommentWithoutPermission in modules/
social_features/ social_comment/ tests/ src/ Kernel/ CommentViewAccessTest.php - Test that a user can not view comment without permission.
- CommentViewAccessTest::testUserCanNotViewOtherUnpublishedComment in modules/
social_features/ social_comment/ tests/ src/ Kernel/ CommentViewAccessTest.php - Test that a user can't view other people's unpublished comments.
- CommentViewAccessTest::testUserCanNotViewOwnUnpublishedComment in modules/
social_features/ social_comment/ tests/ src/ Kernel/ CommentViewAccessTest.php - Test that a user can't view their own unpublished comments.
- CommentViewAccessTest::testUserCanViewOnlyPublishedComment in modules/
social_features/ social_comment/ tests/ src/ Kernel/ CommentViewAccessTest.php - Test that a user can view everyone's published comments.
File
- modules/
social_features/ social_comment/ tests/ src/ Kernel/ CommentViewAccessTest.php, line 86
Class
- CommentViewAccessTest
- Tests comment view level access.
Namespace
Drupal\Tests\social_comment\KernelCode
protected function setUpCurrentUser(array $values = [], array $permissions = [], $admin = FALSE) {
self::assertFalse($admin, "The current setUpCurrentUser workaround doesn't support admin users.");
$user = $this
->createUser($values, $permissions);
$this
->setCurrentUser($user);
return $user;
}