You are here

class CommentXmlAnonTest in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentXmlAnonTest
  2. 9 core/modules/comment/tests/src/Functional/Rest/CommentXmlAnonTest.php \Drupal\Tests\comment\Functional\Rest\CommentXmlAnonTest

@group rest

Hierarchy

Expanded class hierarchy of CommentXmlAnonTest

File

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

Namespace

Drupal\Tests\comment\Functional\Rest
View source
class CommentXmlAnonTest extends CommentResourceTestBase {
  use AnonResourceTestTrait;
  use XmlEntityNormalizationQuirksTrait;

  /**
   * {@inheritdoc}
   */
  protected static $format = 'xml';

  /**
   * {@inheritdoc}
   */
  protected static $mimeType = 'text/xml; charset=UTF-8';

  /**
   * {@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',
    'entity_id',
    'changed',
    'thread',
    'entity_type',
    'field_name',
  ];

  /**
   * {@inheritdoc}
   */
  public function testPostDxWithoutCriticalBaseFields() {

    // Deserialization of the XML format is not supported.
    $this
      ->markTestSkipped();
  }

  /**
   * {@inheritdoc}
   */
  public function testPostSkipCommentApproval() {

    // Deserialization of the XML format is not supported.
    $this
      ->markTestSkipped();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AnonResourceTestTrait::assertAuthenticationEdgeCases protected function
AnonResourceTestTrait::assertResponseWhenMissingAuthentication protected function
CommentResourceTestBase::$entity protected property
CommentResourceTestBase::$entityTypeId protected static property
CommentResourceTestBase::$modules protected static property 2
CommentResourceTestBase::createEntity protected function
CommentResourceTestBase::getExpectedCacheContexts protected function
CommentResourceTestBase::getExpectedCacheTags protected function
CommentResourceTestBase::getExpectedNormalizedEntity protected function
CommentResourceTestBase::getExpectedUnauthorizedAccessMessage protected function
CommentResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability protected function
CommentResourceTestBase::getNormalizedPatchEntity protected function
CommentResourceTestBase::getNormalizedPostEntity protected function
CommentResourceTestBase::setUpAuthorization protected function
CommentTestTrait::addDefaultCommentField public function Adds the default comment field to an entity.
CommentXmlAnonTest::$defaultTheme protected property
CommentXmlAnonTest::$format protected static property
CommentXmlAnonTest::$mimeType protected static property
CommentXmlAnonTest::$patchProtectedFieldNames protected static property Anonymous users cannot edit their own comments. Overrides CommentResourceTestBase::$patchProtectedFieldNames
CommentXmlAnonTest::testPostDxWithoutCriticalBaseFields public function Tests POSTing a comment without critical base fields. Overrides CommentResourceTestBase::testPostDxWithoutCriticalBaseFields
CommentXmlAnonTest::testPostSkipCommentApproval public function Tests POSTing a comment with and without 'skip comment approval'. Overrides CommentResourceTestBase::testPostSkipCommentApproval