You are here

protected static property CommentHalJsonAnonTest::$patchProtectedFieldNames in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/comment/tests/src/Functional/Hal/CommentHalJsonAnonTest.php \Drupal\Tests\comment\Functional\Hal\CommentHalJsonAnonTest::patchProtectedFieldNames

Anonymous users cannot edit their own comments.

Therefore we grant them the 'administer comments' permission for the purpose of this test. Then they are able to edit their own comments, but some fields are still not editable, even with that permission.

Overrides CommentHalJsonTestBase::$patchProtectedFieldNames

See also

\Drupal\comment\CommentAccessControlHandler::checkAccess

::setUpAuthorization

File

core/modules/comment/tests/src/Functional/Hal/CommentHalJsonAnonTest.php, line 32

Class

CommentHalJsonAnonTest
@group hal

Namespace

Drupal\Tests\comment\Functional\Hal

Code

protected static $patchProtectedFieldNames = [
  'changed' => NULL,
  'thread' => NULL,
  'entity_type' => NULL,
  'field_name' => NULL,
  'entity_id' => NULL,
];