CommentXmlAnonTest::$patchProtectedFieldNames

Same name in other branches
  1. 9 core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentXmlAnonTest::patchProtectedFieldNames
  2. 8.9.x 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.

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

Type: patchProtectedFieldNames

Overrides CommentResourceTestBase::$patchProtectedFieldNames

See also

\Drupal\comment\CommentAccessControlHandler::checkAccess

::setUpAuthorization

File

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

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.