class CommentJsonAnonTest

Same name and namespace in other branches
  1. 11.x core/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentJsonAnonTest

@group rest

Hierarchy

Expanded class hierarchy of CommentJsonAnonTest

File

core/modules/comment/tests/src/Functional/Rest/CommentJsonAnonTest.php, line 10

Namespace

Drupal\Tests\comment\Functional\Rest
View source
class CommentJsonAnonTest extends CommentResourceTestBase {
  use AnonResourceTestTrait;
  
  /**
   * {@inheritdoc}
   */
  protected static $format = 'json';
  
  /**
   * {@inheritdoc}
   */
  protected static $mimeType = 'application/json';
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * {@inheritdoc}
   *
   * Anonymous 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.
   *
   * @see ::setUpAuthorization
   */
  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.