Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php \Drupal\FunctionalTests\Rest\BaseFieldOverrideXmlCookieTest
  2. 9 core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php \Drupal\FunctionalTests\Rest\BaseFieldOverrideXmlCookieTest

@group rest

Hierarchy

Expanded class hierarchy of BaseFieldOverrideXmlCookieTest

File

core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideXmlCookieTest.php, line 13

Namespace

Drupal\FunctionalTests\Rest
View source
class BaseFieldOverrideXmlCookieTest extends BaseFieldOverrideResourceTestBase {
  use CookieResourceTestTrait;
  use XmlEntityNormalizationQuirksTrait;

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

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

  /**
   * {@inheritdoc}
   */
  protected static $auth = 'cookie';

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

}

Members

Namesort descending Modifiers Type Description Overrides
BaseFieldOverrideResourceTestBase::$entity protected property Overrides EntityResourceTestBase::$entity
BaseFieldOverrideResourceTestBase::$entityTypeId protected static property The tested entity type. Overrides EntityResourceTestBase::$entityTypeId
BaseFieldOverrideResourceTestBase::$modules protected static property Modules to install. Overrides EntityResourceTestBase::$modules 2
BaseFieldOverrideResourceTestBase::createEntity protected function Creates the entity to be tested. Overrides EntityResourceTestBase::createEntity
BaseFieldOverrideResourceTestBase::getExpectedCacheContexts protected function The expected cache contexts for the GET/HEAD response of the test entity. Overrides EntityResourceTestBase::getExpectedCacheContexts
BaseFieldOverrideResourceTestBase::getExpectedUnauthorizedAccessMessage protected function Return the expected error message. Overrides EntityResourceTestBase::getExpectedUnauthorizedAccessMessage
BaseFieldOverrideResourceTestBase::getNormalizedPostEntity protected function Returns the normalized POST entity. Overrides EntityResourceTestBase::getNormalizedPostEntity
BaseFieldOverrideResourceTestBase::setUpAuthorization protected function Sets up the necessary authorization. Overrides ResourceTestBase::setUpAuthorization
BaseFieldOverrideXmlCookieTest::$auth protected static property The authentication mechanism to use in this test. Overrides ResourceTestBase::$auth
BaseFieldOverrideXmlCookieTest::$defaultTheme protected property
BaseFieldOverrideXmlCookieTest::$format protected static property The format to use in this test. Overrides ResourceTestBase::$format
BaseFieldOverrideXmlCookieTest::$mimeType protected static property The MIME type that corresponds to $format. Overrides ResourceTestBase::$mimeType
ConfigEntityResourceTestBase::setUp protected function Overrides EntityResourceTestBase::setUp
ConfigEntityResourceTestBase::SKIP_METHODS constant A list of test methods to skip.
CookieResourceTestTrait::$csrfToken protected property The CSRF token.
CookieResourceTestTrait::$logoutToken protected property The logout token.
CookieResourceTestTrait::$sessionCookie protected property The session cookie.
CookieResourceTestTrait::assertAuthenticationEdgeCases protected function
CookieResourceTestTrait::assertResponseWhenMissingAuthentication protected function
CookieResourceTestTrait::getAuthenticationRequestOptions protected function
CookieResourceTestTrait::initAuthentication protected function
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::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::$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::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::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.