CommentJsonAnonTest::$patchProtectedFieldNames

Same name in other branches
  1. 8.9.x core/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentJsonAnonTest::patchProtectedFieldNames
  2. 10 core/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentJsonAnonTest::patchProtectedFieldNames
  3. 11.x core/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentJsonAnonTest::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/CommentJsonAnonTest.php, line 41

Class

CommentJsonAnonTest
@group rest

Namespace

Drupal\Tests\comment\Functional\Rest

Code

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

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