Same name and namespace in other branches
  1. 8.9.x core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlAnonTest.php \Drupal\Tests\language\Functional\Rest\ContentLanguageSettingsXmlAnonTest
  2. 9 core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlAnonTest.php \Drupal\Tests\language\Functional\Rest\ContentLanguageSettingsXmlAnonTest

@group rest

Hierarchy

Expanded class hierarchy of ContentLanguageSettingsXmlAnonTest

File

core/modules/language/tests/src/Functional/Rest/ContentLanguageSettingsXmlAnonTest.php, line 13

Namespace

Drupal\Tests\language\Functional\Rest
View source
class ContentLanguageSettingsXmlAnonTest extends ContentLanguageSettingsResourceTestBase {
  use AnonResourceTestTrait;
  use XmlEntityNormalizationQuirksTrait;

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

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

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';

}

Members

Namesort descending Modifiers Type Description Overrides
AnonResourceTestTrait::assertAuthenticationEdgeCases protected function
AnonResourceTestTrait::assertResponseWhenMissingAuthentication protected function
ConfigEntityResourceTestBase::setUp protected function Overrides EntityResourceTestBase::setUp
ConfigEntityResourceTestBase::SKIP_METHODS constant A list of test methods to skip.
ContentLanguageSettingsResourceTestBase::$entity protected property Overrides EntityResourceTestBase::$entity
ContentLanguageSettingsResourceTestBase::$entityTypeId protected static property The tested entity type. Overrides EntityResourceTestBase::$entityTypeId
ContentLanguageSettingsResourceTestBase::$modules protected static property Modules to install. Overrides EntityResourceTestBase::$modules 2
ContentLanguageSettingsResourceTestBase::createEntity protected function Creates the entity to be tested. Overrides EntityResourceTestBase::createEntity
ContentLanguageSettingsResourceTestBase::getExpectedCacheContexts protected function The expected cache contexts for the GET/HEAD response of the test entity. Overrides EntityResourceTestBase::getExpectedCacheContexts
ContentLanguageSettingsResourceTestBase::getNormalizedPostEntity protected function Returns the normalized POST entity. Overrides EntityResourceTestBase::getNormalizedPostEntity
ContentLanguageSettingsResourceTestBase::setUpAuthorization protected function Sets up the necessary authorization. Overrides ResourceTestBase::setUpAuthorization
ContentLanguageSettingsXmlAnonTest::$defaultTheme protected property
ContentLanguageSettingsXmlAnonTest::$format protected static property The format to use in this test. Overrides ResourceTestBase::$format
ContentLanguageSettingsXmlAnonTest::$mimeType protected static property The MIME type that corresponds to $format. Overrides ResourceTestBase::$mimeType
EntityResourceTestBase::$anotherEntity protected property Another entity of the same type used for testing.
EntityResourceTestBase::$entityStorage protected property The entity storage.
EntityResourceTestBase::$firstCreatedEntityId protected static property The entity ID for the first created entity in testPost(). 3
EntityResourceTestBase::$labelFieldName protected static property Optionally specify which field is the 'label' field. 2
EntityResourceTestBase::$patchProtectedFieldNames protected static property The fields that are protected against modification during PATCH requests. 16
EntityResourceTestBase::$secondCreatedEntityId protected static property The entity ID for the second created entity in testPost(). 3
EntityResourceTestBase::$uniqueFieldNames protected static property A list of fields that need a unique value. 1
EntityResourceTestBase::assert406Response protected function Asserts a 406 response… or in some cases a 403 response, because weirdness.
EntityResourceTestBase::assertEntityArraySubset protected function Recursively asserts that the expected items are set in the tested entity.
EntityResourceTestBase::assertNormalizationEdgeCases protected function Asserts normalization-specific edge cases. Overrides ResourceTestBase::assertNormalizationEdgeCases
EntityResourceTestBase::assertPatchProtectedFieldNamesStructure protected function Asserts structure of $patchProtectedFieldNames.
EntityResourceTestBase::assertResourceNotAvailable protected function Asserts that a resource is unavailable: 404, 406 if it has canonical route.
EntityResourceTestBase::assertStoredEntityMatchesSentNormalization protected function Asserts that the stored entity matches the sent normalization.
EntityResourceTestBase::castToString protected static function Transforms a normalization: casts all non-string types to strings.
EntityResourceTestBase::createAnotherEntity protected function Creates another entity to be tested. 2
EntityResourceTestBase::getEntityResourcePostUrl protected function Gets an entity resource's POST URL.
EntityResourceTestBase::getEntityResourceUrl protected function Gets an entity resource's GET/PATCH/DELETE URL.
EntityResourceTestBase::getExpectedCacheTags protected function The expected cache tags for the GET/HEAD response of the test entity. 4
EntityResourceTestBase::getExpectedUnauthorizedAccessCacheability protected function Returns the expected cacheability of an unauthorized access response. Overrides ResourceTestBase::getExpectedUnauthorizedAccessCacheability 1
EntityResourceTestBase::getExpectedUnauthorizedAccessMessage protected function Return the expected error message. Overrides ResourceTestBase::getExpectedUnauthorizedAccessMessage 27
EntityResourceTestBase::getExpectedUnauthorizedEntityAccessCacheability protected function The cacheability of unauthorized 'view' entity access. 6
EntityResourceTestBase::getModifiedEntityForPatchTesting protected static function Clones the given entity and modifies all PATCH-protected fields.
EntityResourceTestBase::getModifiedEntityForPostTesting protected function Gets the normalized POST entity with random values for its unique fields. 1
EntityResourceTestBase::getNormalizedPatchEntity protected function Returns the normalized PATCH entity. 3
EntityResourceTestBase::makeNormalizationInvalid protected function Makes the given entity normalization invalid.
EntityResourceTestBase::provisionEntityResource protected function Provides an entity resource.
EntityResourceTestBase::testDelete public function Tests a DELETE request for an entity, plus edge cases to ensure good DX. 1
EntityResourceTestBase::testGet public function Tests a GET request for an entity, plus edge cases to ensure good DX. 4
ResourceTestBase::$account protected property The account to use for authentication, if any.
ResourceTestBase::$auth protected static property The authentication mechanism to use in this test. 182
ResourceTestBase::$resourceConfigId protected static property The REST Resource Config entity ID under test (i.e. a resource type). 4
ResourceTestBase::$resourceConfigStorage protected property The REST resource config entity storage.
ResourceTestBase::$serializer protected property The serializer service.
ResourceTestBase::assertResourceErrorResponse protected function Asserts that a resource error response has the given message.
ResourceTestBase::assertResourceResponse protected function Asserts that a resource response has the given status code and body.
ResourceTestBase::decorateWithXdebugCookie protected function Adds the Xdebug cookie to the request options.
ResourceTestBase::getAuthenticationRequestOptions protected function Returns Guzzle request options for authentication.
ResourceTestBase::grantPermissionsToAnonymousRole protected function Grants permissions to the anonymous role.
ResourceTestBase::grantPermissionsToAuthenticatedRole protected function Grants permissions to the authenticated role.
ResourceTestBase::grantPermissionsToTestedRole protected function Grants permissions to the tested role: anonymous or authenticated.
ResourceTestBase::initAuthentication protected function Initializes authentication.
ResourceTestBase::provisionResource protected function Provisions the REST resource under test.
ResourceTestBase::recursiveKSort protected static function Recursively sorts an array by key.
ResourceTestBase::refreshTestStateAfterRestConfigChange protected function Refreshes the state of the tester to be in sync with the testee.
ResourceTestBase::request protected function Performs a HTTP request. Wraps the Guzzle HTTP client. 1
XmlEntityNormalizationQuirksTrait::applyXmlConfigEntityDecodingQuirks protected function Applies the XML config entity encoding quirks that remain after decoding.
XmlEntityNormalizationQuirksTrait::applyXmlFieldDecodingQuirks protected function Applies the XML entity field encoding quirks that remain after decoding.
XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity protected function
XmlEntityNormalizationQuirksTrait::testPatch public function
XmlEntityNormalizationQuirksTrait::testPost public function
XmlNormalizationQuirksTrait::applyXmlDecodingQuirks protected function Applies the XML encoding quirks that remain after decoding.