3edd9b16098a253822a221fddbed5cdfe405dca9
[yaffs-website] / web / core / modules / hal / tests / src / Functional / EntityResource / Comment / CommentHalJsonAnonTest.php
1 <?php
2
3 namespace Drupal\Tests\hal\Functional\EntityResource\Comment;
4
5 use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
6
7 /**
8  * @group hal
9  */
10 class CommentHalJsonAnonTest extends CommentHalJsonTestBase {
11
12   use AnonResourceTestTrait;
13
14   /**
15    * {@inheritdoc}
16    *
17    * Anononymous users cannot edit their own comments.
18    *
19    * @see \Drupal\comment\CommentAccessControlHandler::checkAccess
20    *
21    * Therefore we grant them the 'administer comments' permission for the
22    * purpose of this test. Then they are able to edit their own comments, but
23    * some fields are still not editable, even with that permission.
24    *
25    * @see ::setUpAuthorization
26    */
27   protected static $patchProtectedFieldNames = [
28     'changed',
29     'thread',
30     'entity_type',
31     'field_name',
32     'entity_id',
33   ];
34
35 }