CommentXmlAnonTest::$patchProtectedFieldNames

Same name in other branches
  1. 8.9.x core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentXmlAnonTest::patchProtectedFieldNames
  2. 10 core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentXmlAnonTest::patchProtectedFieldNames
  3. 11.x core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentXmlAnonTest::patchProtectedFieldNames

Anonymous users cannot edit their own comments.

Type: patchProtectedFieldNames

Overrides CommentResourceTestBase::$patchProtectedFieldNames

See also

\Drupal\comment\CommentAccessControlHandler::checkAccess

Therefore we grant them the 'administer comments' permission for the purpose of this test.

::setUpAuthorization

File

core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php, line 43

Class

CommentXmlAnonTest
@group rest

Namespace

Drupal\Tests\comment\Functional\Rest

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.