summaryrefslogtreecommitdiffstats
path: root/core/modules/hal/tests/src/Functional/EntityResource/Comment/CommentHalJsonAnonTest.php
blob: 9b0cee24a0ec18f0f7d102b48fee8161513d3437 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

namespace Drupal\Tests\hal\Functional\EntityResource\Comment;

use Drupal\Tests\rest\Functional\AnonResourceTestTrait;

/**
 * @group hal
 */
class CommentHalJsonAnonTest extends CommentHalJsonTestBase {

  use AnonResourceTestTrait;

  /**
   * {@inheritdoc}
   *
   * Anononymous users cannot edit their own comments.
   *
   * @see \Drupal\comment\CommentAccessControlHandler::checkAccess
   *
   * 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.
   *
   * @see ::setUpAuthorization
   */
  protected static $patchProtectedFieldNames = [
    'entity_id',
    'changed',
    'thread',
    'entity_type',
    'field_name',
  ];

}