 .../src/Functional/CookieResourceTestTrait.php     |   2 +-
 .../EntityResource/Action/ActionXmlAnonTest.php    |  26 ++++
 .../Action/ActionXmlBasicAuthTest.php              |  36 +++++
 .../EntityResource/Action/ActionXmlCookieTest.php  |  31 ++++
 .../BaseFieldOverrideXmlAnonTest.php               |  26 ++++
 .../BaseFieldOverrideXmlBasicAuthTest.php          |  36 +++++
 .../BaseFieldOverrideXmlCookieTest.php             |  31 ++++
 .../EntityResource/Block/BlockXmlAnonTest.php      |  26 ++++
 .../EntityResource/Block/BlockXmlBasicAuthTest.php |  36 +++++
 .../EntityResource/Block/BlockXmlCookieTest.php    |  31 ++++
 .../BlockContent/BlockContentXmlAnonTest.php       |  26 ++++
 .../BlockContent/BlockContentXmlBasicAuthTest.php  |  36 +++++
 .../BlockContent/BlockContentXmlCookieTest.php     |  31 ++++
 .../BlockContentTypeXmlAnonTest.php                |  26 ++++
 .../BlockContentTypeXmlBasicAuthTest.php           |  36 +++++
 .../BlockContentTypeXmlCookieTest.php              |  31 ++++
 .../EntityResource/Comment/CommentXmlAnonTest.php  |  63 ++++++++
 .../Comment/CommentXmlBasicAuthTest.php            |  52 +++++++
 .../Comment/CommentXmlCookieTest.php               |  47 ++++++
 .../CommentType/CommentTypeXmlAnonTest.php         |  26 ++++
 .../CommentType/CommentTypeXmlBasicAuthTest.php    |  36 +++++
 .../CommentType/CommentTypeXmlCookieTest.php       |  31 ++++
 .../ConfigTest/ConfigTestXmlAnonTest.php           |  26 ++++
 .../ConfigTest/ConfigTestXmlBasicAuthTest.php      |  36 +++++
 .../ConfigTest/ConfigTestXmlCookieTest.php         |  31 ++++
 .../ConfigurableLanguageXmlAnonTest.php            |  26 ++++
 .../ConfigurableLanguageXmlBasicAuthTest.php       |  36 +++++
 .../ConfigurableLanguageXmlCookieTest.php          |  31 ++++
 .../ContactForm/ContactFormXmlAnonTest.php         |  26 ++++
 .../ContactForm/ContactFormXmlBasicAuthTest.php    |  36 +++++
 .../ContactForm/ContactFormXmlCookieTest.php       |  31 ++++
 .../ContentLanguageSettingsXmlAnonTest.php         |  26 ++++
 .../ContentLanguageSettingsXmlBasicAuthTest.php    |  36 +++++
 .../ContentLanguageSettingsXmlCookieTest.php       |  31 ++++
 .../DateFormat/DateFormatXmlAnonTest.php           |  26 ++++
 .../DateFormat/DateFormatXmlBasicAuthTest.php      |  36 +++++
 .../DateFormat/DateFormatXmlCookieTest.php         |  31 ++++
 .../EntityResource/Editor/EditorXmlAnonTest.php    |  26 ++++
 .../Editor/EditorXmlBasicAuthTest.php              |  36 +++++
 .../EntityResource/Editor/EditorXmlCookieTest.php  |  31 ++++
 .../EntityResource/EntityResourceTestBase.php      |  76 ++++++++--
 .../EntityTest/EntityTestXmlAnonTest.php           |  26 ++++
 .../EntityTest/EntityTestXmlBasicAuthTest.php      |  36 +++++
 .../EntityTest/EntityTestXmlCookieTest.php         |  31 ++++
 .../EntityTestBundleXmlAnonTest.php                |  26 ++++
 .../EntityTestBundleXmlBasicAuthTest.php           |  36 +++++
 .../EntityTestBundleXmlCookieTest.php              |  31 ++++
 .../EntityTestLabel/EntityTestLabelXmlAnonTest.php |  26 ++++
 .../EntityTestLabelXmlBasicAuthTest.php            |  36 +++++
 .../EntityTestLabelXmlCookieTest.php               |  31 ++++
 .../EntityResource/Feed/FeedXmlAnonTest.php        |  26 ++++
 .../EntityResource/Feed/FeedXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Feed/FeedXmlCookieTest.php      |  31 ++++
 .../FieldConfig/FieldConfigXmlAnonTest.php         |  26 ++++
 .../FieldConfig/FieldConfigXmlBasicAuthTest.php    |  36 +++++
 .../FieldConfig/FieldConfigXmlCookieTest.php       |  31 ++++
 .../FieldStorageConfigXmlAnonTest.php              |  26 ++++
 .../FieldStorageConfigXmlBasicAuthTest.php         |  36 +++++
 .../FieldStorageConfigXmlCookieTest.php            |  31 ++++
 .../FilterFormat/FilterFormatXmlAnonTest.php       |  26 ++++
 .../FilterFormat/FilterFormatXmlBasicAuthTest.php  |  36 +++++
 .../FilterFormat/FilterFormatXmlCookieTest.php     |  31 ++++
 .../ImageStyle/ImageStyleXmlAnonTest.php           |  34 +++++
 .../ImageStyle/ImageStyleXmlBasicAuthTest.php      |  44 ++++++
 .../ImageStyle/ImageStyleXmlCookieTest.php         |  39 +++++
 .../EntityResource/Item/ItemXmlAnonTest.php        |  26 ++++
 .../EntityResource/Item/ItemXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Item/ItemXmlCookieTest.php      |  31 ++++
 .../EntityResource/Media/MediaXmlAnonTest.php      |  26 ++++
 .../EntityResource/Media/MediaXmlBasicAuthTest.php |  36 +++++
 .../EntityResource/Media/MediaXmlCookieTest.php    |  31 ++++
 .../MediaType/MediaTypeXmlAnonTest.php             |  26 ++++
 .../MediaType/MediaTypeXmlBasicAuthTest.php        |  36 +++++
 .../MediaType/MediaTypeXmlCookieTest.php           |  31 ++++
 .../EntityResource/Menu/MenuXmlAnonTest.php        |  26 ++++
 .../EntityResource/Menu/MenuXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Menu/MenuXmlCookieTest.php      |  31 ++++
 .../MenuLinkContent/MenuLinkContentXmlAnonTest.php |  26 ++++
 .../MenuLinkContentXmlBasicAuthTest.php            |  36 +++++
 .../MenuLinkContentXmlCookieTest.php               |  31 ++++
 .../EntityResource/Node/NodeXmlAnonTest.php        |  26 ++++
 .../EntityResource/Node/NodeXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Node/NodeXmlCookieTest.php      |  31 ++++
 .../NodeType/NodeTypeXmlAnonTest.php               |  26 ++++
 .../NodeType/NodeTypeXmlBasicAuthTest.php          |  36 +++++
 .../NodeType/NodeTypeXmlCookieTest.php             |  31 ++++
 .../RdfMapping/RdfMappingXmlAnonTest.php           |  26 ++++
 .../RdfMapping/RdfMappingXmlBasicAuthTest.php      |  36 +++++
 .../RdfMapping/RdfMappingXmlCookieTest.php         |  31 ++++
 .../ResponsiveImageStyleXmlAnonTest.php            |  26 ++++
 .../ResponsiveImageStyleXmlBasicAuthTest.php       |  36 +++++
 .../ResponsiveImageStyleXmlCookieTest.php          |  31 ++++
 .../RestResourceConfigXmlAnonTest.php              |  26 ++++
 .../RestResourceConfigXmlBasicAuthTest.php         |  36 +++++
 .../RestResourceConfigXmlCookieTest.php            |  31 ++++
 .../EntityResource/Role/RoleXmlAnonTest.php        |  26 ++++
 .../EntityResource/Role/RoleXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Role/RoleXmlCookieTest.php      |  31 ++++
 .../SearchPage/SearchPageXmlAnonTest.php           |  26 ++++
 .../SearchPage/SearchPageXmlBasicAuthTest.php      |  36 +++++
 .../SearchPage/SearchPageXmlCookieTest.php         |  31 ++++
 .../Shortcut/ShortcutXmlAnonTest.php               |  26 ++++
 .../Shortcut/ShortcutXmlBasicAuthTest.php          |  36 +++++
 .../Shortcut/ShortcutXmlCookieTest.php             |  31 ++++
 .../ShortcutSet/ShortcutSetXmlAnonTest.php         |  26 ++++
 .../ShortcutSet/ShortcutSetXmlBasicAuthTest.php    |  36 +++++
 .../ShortcutSet/ShortcutSetXmlCookieTest.php       |  31 ++++
 .../EntityResource/Term/TermXmlAnonTest.php        |  26 ++++
 .../EntityResource/Term/TermXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Term/TermXmlCookieTest.php      |  31 ++++
 .../EntityResource/Tour/TourXmlAnonTest.php        |  26 ++++
 .../EntityResource/Tour/TourXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/Tour/TourXmlCookieTest.php      |  31 ++++
 .../EntityResource/User/UserXmlAnonTest.php        |  34 +++++
 .../EntityResource/User/UserXmlBasicAuthTest.php   |  44 ++++++
 .../EntityResource/User/UserXmlCookieTest.php      |  39 +++++
 .../EntityResource/View/ViewXmlAnonTest.php        |  26 ++++
 .../EntityResource/View/ViewXmlBasicAuthTest.php   |  36 +++++
 .../EntityResource/View/ViewXmlCookieTest.php      |  31 ++++
 .../Vocabulary/VocabularyXmlAnonTest.php           |  26 ++++
 .../Vocabulary/VocabularyXmlBasicAuthTest.php      |  36 +++++
 .../Vocabulary/VocabularyXmlCookieTest.php         |  31 ++++
 .../XmlEntityNormalizationQuirksTrait.php          | 158 +++++++++++++++++++++
 .../src/Functional/XmlNormalizationQuirksTrait.php |  63 ++++++++
 124 files changed, 4126 insertions(+), 10 deletions(-)

diff --git a/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php b/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php
index 3b7c3b4..4db019c 100644
--- a/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php
+++ b/core/modules/rest/tests/src/Functional/CookieResourceTestTrait.php
@@ -61,7 +61,7 @@ protected function initAuthentication() {
       'pass' => $this->account->passRaw,
     ];
 
-    $request_options[RequestOptions::BODY] = $this->serializer->encode($request_body, 'json');
+    $request_options[RequestOptions::BODY] = $this->serializer->encode($request_body, static::$format);
     $request_options[RequestOptions::HEADERS] = [
       'Content-Type' => static::$mimeType,
     ];
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlAnonTest.php
new file mode 100644
index 0000000..3bce75e
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Action;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ActionXmlAnonTest extends ActionResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlBasicAuthTest.php
new file mode 100644
index 0000000..a81051d
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Action;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ActionXmlBasicAuthTest extends ActionResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlCookieTest.php
new file mode 100644
index 0000000..85b28ac
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Action/ActionXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Action;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ActionXmlCookieTest extends ActionResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlAnonTest.php
new file mode 100644
index 0000000..17e8bbf
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BaseFieldOverride;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BaseFieldOverrideXmlAnonTest extends BaseFieldOverrideResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlBasicAuthTest.php
new file mode 100644
index 0000000..7793c90
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BaseFieldOverride;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BaseFieldOverrideXmlBasicAuthTest extends BaseFieldOverrideResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlCookieTest.php
new file mode 100644
index 0000000..d8b86e1
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BaseFieldOverride/BaseFieldOverrideXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BaseFieldOverride;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+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';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlAnonTest.php
new file mode 100644
index 0000000..7861e2e
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Block;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockXmlAnonTest extends BlockResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlBasicAuthTest.php
new file mode 100644
index 0000000..6594f4f
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Block;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockXmlBasicAuthTest extends BlockResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlCookieTest.php
new file mode 100644
index 0000000..34a0937
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Block/BlockXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Block;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockXmlCookieTest extends BlockResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlAnonTest.php
new file mode 100644
index 0000000..5f13cf0
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BlockContent;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockContentXmlAnonTest extends BlockContentResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlBasicAuthTest.php
new file mode 100644
index 0000000..c02d2f0
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BlockContent;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockContentXmlBasicAuthTest extends BlockContentResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlCookieTest.php
new file mode 100644
index 0000000..6a605d4
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BlockContent;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockContentXmlCookieTest extends BlockContentResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlAnonTest.php
new file mode 100644
index 0000000..924b2b7
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BlockContentType;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockContentTypeXmlAnonTest extends BlockContentTypeResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlBasicAuthTest.php
new file mode 100644
index 0000000..0f294c5
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BlockContentType;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockContentTypeXmlBasicAuthTest extends BlockContentTypeResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlCookieTest.php
new file mode 100644
index 0000000..bd39e01
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContentType/BlockContentTypeXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\BlockContentType;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class BlockContentTypeXmlCookieTest extends BlockContentTypeResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlAnonTest.php
new file mode 100644
index 0000000..aa45f5c
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlAnonTest.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Comment;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class CommentXmlAnonTest extends CommentResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   *
+   * Anononymous 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();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlBasicAuthTest.php
new file mode 100644
index 0000000..c167ea7
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlBasicAuthTest.php
@@ -0,0 +1,52 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Comment;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class CommentXmlBasicAuthTest extends CommentResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+  /**
+   * {@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();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlCookieTest.php
new file mode 100644
index 0000000..1ece71b
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentXmlCookieTest.php
@@ -0,0 +1,47 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Comment;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class CommentXmlCookieTest extends CommentResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+  /**
+   * {@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();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlAnonTest.php
new file mode 100644
index 0000000..bfda97a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\CommentType;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class CommentTypeXmlAnonTest extends CommentTypeResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlBasicAuthTest.php
new file mode 100644
index 0000000..04b114a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\CommentType;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class CommentTypeXmlBasicAuthTest extends CommentTypeResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlCookieTest.php
new file mode 100644
index 0000000..545b8c1
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/CommentType/CommentTypeXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\CommentType;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class CommentTypeXmlCookieTest extends CommentTypeResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlAnonTest.php
new file mode 100644
index 0000000..2df1af7
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ConfigTest;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ConfigTestXmlAnonTest extends ConfigTestResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlBasicAuthTest.php
new file mode 100644
index 0000000..b1e6f76
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ConfigTest;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ConfigTestXmlBasicAuthTest extends ConfigTestResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlCookieTest.php
new file mode 100644
index 0000000..6e8bf50
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigTest/ConfigTestXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ConfigTest;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ConfigTestXmlCookieTest extends ConfigTestResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlAnonTest.php
new file mode 100644
index 0000000..a698aad
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ConfigurableLanguage;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ConfigurableLanguageXmlAnonTest extends ConfigurableLanguageResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlBasicAuthTest.php
new file mode 100644
index 0000000..a6bcbb7
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ConfigurableLanguage;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ConfigurableLanguageXmlBasicAuthTest extends ConfigurableLanguageResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlCookieTest.php
new file mode 100644
index 0000000..9420fdf
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ConfigurableLanguage/ConfigurableLanguageXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ConfigurableLanguage;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ConfigurableLanguageXmlCookieTest extends ConfigurableLanguageResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlAnonTest.php
new file mode 100644
index 0000000..0c4b6cb
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ContactForm;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ContactFormXmlAnonTest extends ContactFormResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlBasicAuthTest.php
new file mode 100644
index 0000000..215501d
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ContactForm;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ContactFormXmlBasicAuthTest extends ContactFormResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlCookieTest.php
new file mode 100644
index 0000000..6134733
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContactForm/ContactFormXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ContactForm;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ContactFormXmlCookieTest extends ContactFormResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlAnonTest.php
new file mode 100644
index 0000000..eb1bdce
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ContentLanguageSettings;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ContentLanguageSettingsXmlAnonTest extends ContentLanguageSettingsResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlBasicAuthTest.php
new file mode 100644
index 0000000..b0d3f85
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ContentLanguageSettings;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ContentLanguageSettingsXmlBasicAuthTest extends ContentLanguageSettingsResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlCookieTest.php
new file mode 100644
index 0000000..2ccb6f9
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ContentLanguageSettings/ContentLanguageSettingsXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ContentLanguageSettings;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ContentLanguageSettingsXmlCookieTest extends ContentLanguageSettingsResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlAnonTest.php
new file mode 100644
index 0000000..6a5873a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\DateFormat;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class DateFormatXmlAnonTest extends DateFormatResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlBasicAuthTest.php
new file mode 100644
index 0000000..488a93e
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\DateFormat;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class DateFormatXmlBasicAuthTest extends DateFormatResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlCookieTest.php
new file mode 100644
index 0000000..4818395
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/DateFormat/DateFormatXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\DateFormat;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class DateFormatXmlCookieTest extends DateFormatResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlAnonTest.php
new file mode 100644
index 0000000..763f9f9
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Editor;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EditorXmlAnonTest extends EditorResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlBasicAuthTest.php
new file mode 100644
index 0000000..aa1c042
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Editor;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EditorXmlBasicAuthTest extends EditorResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlCookieTest.php
new file mode 100644
index 0000000..61dbcfe
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Editor/EditorXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Editor;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EditorXmlCookieTest extends EditorResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
index fe4ebb8..3bd043a 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php
@@ -175,11 +175,29 @@ public function setUp() {
         ->setTranslatable(FALSE)
         ->save();
 
-      // Reload entity so that it has the new field.
+      // Add multi-value field.
+      FieldStorageConfig::create([
+        'entity_type' => static::$entityTypeId,
+        'field_name' => 'field_rest_test_multivalue',
+        'type' => 'string',
+      ])
+        ->setCardinality(2)
+        ->save();
+      FieldConfig::create([
+        'entity_type' => static::$entityTypeId,
+        'field_name' => 'field_rest_test_multivalue',
+        'bundle' => $this->entity->bundle(),
+      ])
+        ->setLabel('Test field: multi-value')
+        ->setTranslatable(FALSE)
+        ->save();
+
+      // Reload entity so that it has the new fields.
       $this->entity = $this->entityStorage->loadUnchanged($this->entity->id());
 
-      // Set a default value on the field.
+      // Set a default value on the fields.
       $this->entity->set('field_rest_test', ['value' => 'All the faith he had had had had no effect on the outcome of his life.']);
+      $this->entity->set('field_rest_test_multivalue', [['value' => 'One'], ['value' => 'Two']]);
       $this->entity->save();
     }
   }
@@ -455,6 +473,18 @@ public function testGet() {
     // for the keys with the array order the same (it needs to match with
     // identical comparison).
     $expected = $this->getExpectedNormalizedEntity();
+    if ($this->entity instanceof FieldableEntityInterface) {
+      $expected += [
+        'field_rest_test_multivalue' => [
+          0 => [
+            'value' => 'One',
+          ],
+          1 => [
+            'value' => 'Two',
+          ],
+        ]
+      ];
+    }
     static::recursiveKSort($expected);
     $actual = $this->serializer->decode((string) $response->getBody(), static::$format);
     static::recursiveKSort($actual);
@@ -462,8 +492,12 @@ public function testGet() {
 
     // Not only assert the normalization, also assert deserialization of the
     // response results in the expected object.
-    $unserialized = $this->serializer->deserialize((string) $response->getBody(), get_class($this->entity), static::$format);
-    $this->assertSame($unserialized->uuid(), $this->entity->uuid());
+    // Note: deserialization of the XML format is not supported, so only test
+    // this for other formats.
+    if (static::$format !== 'xml') {
+      $unserialized = $this->serializer->deserialize((string) $response->getBody(), get_class($this->entity), static::$format);
+      $this->assertSame($unserialized->uuid(), $this->entity->uuid());
+    }
     // Finally, assert that the expected 'Link' headers are present.
     if ($this->entity->getEntityType()->getLinkTemplates()) {
       $this->assertArrayHasKey('Link', $response->getHeaders());
@@ -486,11 +520,11 @@ public function testGet() {
     $get_headers = $response->getHeaders();
 
     // Verify that the GET and HEAD responses are the same. The only difference
-    // is that there's no body. For this reason the 'Transfer-Encoding' header
-    // is also added to the list of headers to ignore, as this could be added to
-    // GET requests - depending on web server configuration. This would usually
-    // be 'Transfer-Encoding: chunked'.
-    $ignored_headers = ['Date', 'Content-Length', 'X-Drupal-Cache', 'X-Drupal-Dynamic-Cache', 'Transfer-Encoding'];
+    // is that there's no body. For this reason the 'Transfer-Encoding' and
+    // 'Vary' headers are also added to the list of headers to ignore, as they
+    // may be to GET requests - depending on web server configuration. They are
+    // usually 'Transfer-Encoding: chunked' and 'Vary: Accept-Encoding'.
+    $ignored_headers = ['Date', 'Content-Length', 'X-Drupal-Cache', 'X-Drupal-Dynamic-Cache', 'Transfer-Encoding', 'Vary'];
     foreach ($ignored_headers as $ignored_header) {
       unset($head_headers[$ignored_header]);
       unset($get_headers[$ignored_header]);
@@ -517,6 +551,18 @@ public function testGet() {
       // normalized entity's values to strings. This ensures the BC layer for
       // bc_primitives_as_strings works as expected.
       $expected = $this->getExpectedNormalizedEntity();
+      if ($this->entity instanceof FieldableEntityInterface) {
+        $expected += [
+          'field_rest_test_multivalue' => [
+            0 => [
+              'value' => 'One',
+            ],
+            1 => [
+              'value' => 'Two',
+            ],
+          ]
+        ];
+      }
       // Config entities are not affected.
       // @see \Drupal\serialization\Normalizer\ConfigEntityNormalizer::normalize()
       $expected = static::castToString($expected);
@@ -552,6 +598,18 @@ public function testGet() {
       // ::formatExpectedTimestampValue() to generate the timestamp value. This
       // will take into account the above config setting.
       $expected = $this->getExpectedNormalizedEntity();
+      if ($this->entity instanceof FieldableEntityInterface) {
+        $expected += [
+          'field_rest_test_multivalue' => [
+            0 => [
+              'value' => 'One',
+            ],
+            1 => [
+              'value' => 'Two',
+            ],
+          ]
+        ];
+      }
       // Config entities are not affected.
       // @see \Drupal\serialization\Normalizer\ConfigEntityNormalizer::normalize()
       static::recursiveKSort($expected);
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlAnonTest.php
new file mode 100644
index 0000000..e278083
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTest;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestXmlAnonTest extends EntityTestResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlBasicAuthTest.php
new file mode 100644
index 0000000..55c7246
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTest;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestXmlBasicAuthTest extends EntityTestResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlCookieTest.php
new file mode 100644
index 0000000..247ebd8
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTest/EntityTestXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTest;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestXmlCookieTest extends EntityTestResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlAnonTest.php
new file mode 100644
index 0000000..2b99274
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestBundle;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestBundleXmlAnonTest extends EntityTestBundleResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlBasicAuthTest.php
new file mode 100644
index 0000000..2c5a4e4
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestBundle;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestBundleXmlBasicAuthTest extends EntityTestBundleResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlCookieTest.php
new file mode 100644
index 0000000..fdf6e0a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestBundle/EntityTestBundleXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestBundle;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestBundleXmlCookieTest extends EntityTestBundleResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlAnonTest.php
new file mode 100644
index 0000000..ef2005a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestLabel;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestLabelXmlAnonTest extends EntityTestLabelResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlBasicAuthTest.php
new file mode 100644
index 0000000..1754d55
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestLabel;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestLabelXmlBasicAuthTest extends EntityTestLabelResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlCookieTest.php
new file mode 100644
index 0000000..406d360
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityTestLabel/EntityTestLabelXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\EntityTestLabel;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class EntityTestLabelXmlCookieTest extends EntityTestLabelResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlAnonTest.php
new file mode 100644
index 0000000..f2a3233
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Feed;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FeedXmlAnonTest extends FeedResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlBasicAuthTest.php
new file mode 100644
index 0000000..08dc65d
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Feed;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FeedXmlBasicAuthTest extends FeedResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlCookieTest.php
new file mode 100644
index 0000000..377690a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Feed/FeedXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Feed;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FeedXmlCookieTest extends FeedResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlAnonTest.php
new file mode 100644
index 0000000..d775189
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FieldConfig;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FieldConfigXmlAnonTest extends FieldConfigResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlBasicAuthTest.php
new file mode 100644
index 0000000..ed82264
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FieldConfig;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FieldConfigXmlBasicAuthTest extends FieldConfigResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlCookieTest.php
new file mode 100644
index 0000000..4e715d0
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FieldConfig;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FieldConfigXmlCookieTest extends FieldConfigResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlAnonTest.php
new file mode 100644
index 0000000..c5f3a91
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FieldStorageConfig;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FieldStorageConfigXmlAnonTest extends FieldStorageConfigResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlBasicAuthTest.php
new file mode 100644
index 0000000..6f55722
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FieldStorageConfig;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FieldStorageConfigXmlBasicAuthTest extends FieldStorageConfigResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlCookieTest.php
new file mode 100644
index 0000000..e629df2
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FieldStorageConfig/FieldStorageConfigXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FieldStorageConfig;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FieldStorageConfigXmlCookieTest extends FieldStorageConfigResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlAnonTest.php
new file mode 100644
index 0000000..8eddfa1
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FilterFormat;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FilterFormatXmlAnonTest extends FilterFormatResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlBasicAuthTest.php
new file mode 100644
index 0000000..d1aa25d
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FilterFormat;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FilterFormatXmlBasicAuthTest extends FilterFormatResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlCookieTest.php
new file mode 100644
index 0000000..9437b73
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/FilterFormat/FilterFormatXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\FilterFormat;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class FilterFormatXmlCookieTest extends FilterFormatResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlAnonTest.php
new file mode 100644
index 0000000..1714c27
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlAnonTest.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ImageStyle;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ImageStyleXmlAnonTest extends ImageStyleResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testGet() {
+    // @todo Remove this method override in https://www.drupal.org/node/2905655
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlBasicAuthTest.php
new file mode 100644
index 0000000..54febc6
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlBasicAuthTest.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ImageStyle;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ImageStyleXmlBasicAuthTest extends ImageStyleResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testGet() {
+    // @todo Remove this method override in https://www.drupal.org/node/2905655
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlCookieTest.php
new file mode 100644
index 0000000..5cbb29a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ImageStyle/ImageStyleXmlCookieTest.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ImageStyle;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ImageStyleXmlCookieTest extends ImageStyleResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testGet() {
+    // @todo Remove this method override in https://www.drupal.org/node/2905655
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlAnonTest.php
new file mode 100644
index 0000000..72a3035
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Item;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ItemXmlAnonTest extends ItemResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlBasicAuthTest.php
new file mode 100644
index 0000000..8da0a58
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Item;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ItemXmlBasicAuthTest extends ItemResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlCookieTest.php
new file mode 100644
index 0000000..5fae069
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Item/ItemXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Item;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ItemXmlCookieTest extends ItemResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlAnonTest.php
new file mode 100644
index 0000000..4b02454
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Media;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MediaXmlAnonTest extends MediaResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlBasicAuthTest.php
new file mode 100644
index 0000000..bf6cf33
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Media;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MediaXmlBasicAuthTest extends MediaResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlCookieTest.php
new file mode 100644
index 0000000..b6e03c3
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Media/MediaXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Media;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MediaXmlCookieTest extends MediaResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlAnonTest.php
new file mode 100644
index 0000000..d39fd73
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\MediaType;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MediaTypeXmlAnonTest extends MediaTypeResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlBasicAuthTest.php
new file mode 100644
index 0000000..834a83a
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\MediaType;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MediaTypeXmlBasicAuthTest extends MediaTypeResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlCookieTest.php
new file mode 100644
index 0000000..088d746
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MediaType/MediaTypeXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\MediaType;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MediaTypeXmlCookieTest extends MediaTypeResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlAnonTest.php
new file mode 100644
index 0000000..2258450
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Menu;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MenuXmlAnonTest extends MenuResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlBasicAuthTest.php
new file mode 100644
index 0000000..62e1d59
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Menu;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MenuXmlBasicAuthTest extends MenuResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlCookieTest.php
new file mode 100644
index 0000000..5a5cdfa
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Menu/MenuXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Menu;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MenuXmlCookieTest extends MenuResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlAnonTest.php
new file mode 100644
index 0000000..5141cb7
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\MenuLinkContent;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MenuLinkContentXmlAnonTest extends MenuLinkContentResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlBasicAuthTest.php
new file mode 100644
index 0000000..6a62f36
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\MenuLinkContent;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MenuLinkContentXmlBasicAuthTest extends MenuLinkContentResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlCookieTest.php
new file mode 100644
index 0000000..f73d493
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/MenuLinkContent/MenuLinkContentXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\MenuLinkContent;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class MenuLinkContentXmlCookieTest extends MenuLinkContentResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlAnonTest.php
new file mode 100644
index 0000000..eb06390
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Node;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class NodeXmlAnonTest extends NodeResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlBasicAuthTest.php
new file mode 100644
index 0000000..93838f2
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Node;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class NodeXmlBasicAuthTest extends NodeResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlCookieTest.php
new file mode 100644
index 0000000..39ae7dd
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Node/NodeXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Node;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class NodeXmlCookieTest extends NodeResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlAnonTest.php
new file mode 100644
index 0000000..b3aa416
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\NodeType;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class NodeTypeXmlAnonTest extends NodeTypeResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlBasicAuthTest.php
new file mode 100644
index 0000000..f26e980
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\NodeType;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class NodeTypeXmlBasicAuthTest extends NodeTypeResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlCookieTest.php
new file mode 100644
index 0000000..ab0c998
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/NodeType/NodeTypeXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\NodeType;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class NodeTypeXmlCookieTest extends NodeTypeResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlAnonTest.php
new file mode 100644
index 0000000..448ac47
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\RdfMapping;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RdfMappingXmlAnonTest extends RdfMappingResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlBasicAuthTest.php
new file mode 100644
index 0000000..8f3bae3
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\RdfMapping;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RdfMappingXmlBasicAuthTest extends RdfMappingResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlCookieTest.php
new file mode 100644
index 0000000..a45e5b2
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RdfMapping/RdfMappingXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\RdfMapping;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RdfMappingXmlCookieTest extends RdfMappingResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlAnonTest.php
new file mode 100644
index 0000000..db55fb7
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ResponsiveImageStyle;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ResponsiveImageStyleXmlAnonTest extends ResponsiveImageStyleResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlBasicAuthTest.php
new file mode 100644
index 0000000..fbdeb0c
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ResponsiveImageStyle;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ResponsiveImageStyleXmlBasicAuthTest extends ResponsiveImageStyleResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlCookieTest.php
new file mode 100644
index 0000000..66c13d2
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ResponsiveImageStyle/ResponsiveImageStyleXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ResponsiveImageStyle;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ResponsiveImageStyleXmlCookieTest extends ResponsiveImageStyleResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlAnonTest.php
new file mode 100644
index 0000000..21971cc
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RestResourceConfigXmlAnonTest extends RestResourceConfigResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlBasicAuthTest.php
new file mode 100644
index 0000000..edbb150
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RestResourceConfigXmlBasicAuthTest extends RestResourceConfigResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlCookieTest.php
new file mode 100644
index 0000000..7901894
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/RestResourceConfig/RestResourceConfigXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\RestResourceConfig;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RestResourceConfigXmlCookieTest extends RestResourceConfigResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlAnonTest.php
new file mode 100644
index 0000000..e780bee
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Role;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RoleXmlAnonTest extends RoleResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlBasicAuthTest.php
new file mode 100644
index 0000000..9fef07d
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Role;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RoleXmlBasicAuthTest extends RoleResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlCookieTest.php
new file mode 100644
index 0000000..8e0b0e2
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Role/RoleXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Role;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class RoleXmlCookieTest extends RoleResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlAnonTest.php
new file mode 100644
index 0000000..dce277d
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\SearchPage;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class SearchPageXmlAnonTest extends SearchPageResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlBasicAuthTest.php
new file mode 100644
index 0000000..784a978
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\SearchPage;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class SearchPageXmlBasicAuthTest extends SearchPageResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlCookieTest.php
new file mode 100644
index 0000000..f54e7b1
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/SearchPage/SearchPageXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\SearchPage;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class SearchPageXmlCookieTest extends SearchPageResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlAnonTest.php
new file mode 100644
index 0000000..5929d32
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Shortcut;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ShortcutXmlAnonTest extends ShortcutResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlBasicAuthTest.php
new file mode 100644
index 0000000..161ecf2
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Shortcut;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ShortcutXmlBasicAuthTest extends ShortcutResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlCookieTest.php
new file mode 100644
index 0000000..7623e29
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Shortcut/ShortcutXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Shortcut;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ShortcutXmlCookieTest extends ShortcutResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlAnonTest.php
new file mode 100644
index 0000000..eedd888
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ShortcutSet;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ShortcutSetXmlAnonTest extends ShortcutSetResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlBasicAuthTest.php
new file mode 100644
index 0000000..d18007c
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ShortcutSet;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ShortcutSetXmlBasicAuthTest extends ShortcutSetResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlCookieTest.php
new file mode 100644
index 0000000..c4387ee
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/ShortcutSet/ShortcutSetXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\ShortcutSet;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ShortcutSetXmlCookieTest extends ShortcutSetResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlAnonTest.php
new file mode 100644
index 0000000..4f0a533
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Term;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class TermXmlAnonTest extends TermResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlBasicAuthTest.php
new file mode 100644
index 0000000..c890316
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Term;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class TermXmlBasicAuthTest extends TermResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlCookieTest.php
new file mode 100644
index 0000000..4d51abb
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Term/TermXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Term;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class TermXmlCookieTest extends TermResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlAnonTest.php
new file mode 100644
index 0000000..4c96e37
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Tour;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class TourXmlAnonTest extends TourResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlBasicAuthTest.php
new file mode 100644
index 0000000..1f1860b
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Tour;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class TourXmlBasicAuthTest extends TourResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlCookieTest.php
new file mode 100644
index 0000000..10845c1
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Tour/TourXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Tour;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class TourXmlCookieTest extends TourResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlAnonTest.php
new file mode 100644
index 0000000..8f1d483
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlAnonTest.php
@@ -0,0 +1,34 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\User;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class UserXmlAnonTest extends UserResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testPatchDxForSecuritySensitiveBaseFields() {
+    // Deserialization of the XML format is not supported.
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlBasicAuthTest.php
new file mode 100644
index 0000000..dbf74b1
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlBasicAuthTest.php
@@ -0,0 +1,44 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\User;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class UserXmlBasicAuthTest extends UserResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testPatchDxForSecuritySensitiveBaseFields() {
+    // Deserialization of the XML format is not supported.
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlCookieTest.php
new file mode 100644
index 0000000..d1ef16e
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/User/UserXmlCookieTest.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\User;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class UserXmlCookieTest extends UserResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testPatchDxForSecuritySensitiveBaseFields() {
+    // Deserialization of the XML format is not supported.
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlAnonTest.php
new file mode 100644
index 0000000..2bef328
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\View;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ViewXmlAnonTest extends ViewResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlBasicAuthTest.php
new file mode 100644
index 0000000..3059b5c
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\View;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ViewXmlBasicAuthTest extends ViewResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlCookieTest.php
new file mode 100644
index 0000000..24786a3
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/View/ViewXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\View;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class ViewXmlCookieTest extends ViewResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlAnonTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlAnonTest.php
new file mode 100644
index 0000000..3e2a300
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlAnonTest.php
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Vocabulary;
+
+use Drupal\Tests\rest\Functional\AnonResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class VocabularyXmlAnonTest extends VocabularyResourceTestBase {
+
+  use AnonResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlBasicAuthTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlBasicAuthTest.php
new file mode 100644
index 0000000..a62c5be
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlBasicAuthTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Vocabulary;
+
+use Drupal\Tests\rest\Functional\BasicAuthResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class VocabularyXmlBasicAuthTest extends VocabularyResourceTestBase {
+
+  use BasicAuthResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'basic_auth';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlCookieTest.php b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlCookieTest.php
new file mode 100644
index 0000000..e1cd931
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Vocabulary/VocabularyXmlCookieTest.php
@@ -0,0 +1,31 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource\Vocabulary;
+
+use Drupal\Tests\rest\Functional\CookieResourceTestTrait;
+use Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait;
+
+/**
+ * @group rest
+ */
+class VocabularyXmlCookieTest extends VocabularyResourceTestBase {
+
+  use CookieResourceTestTrait;
+  use XmlEntityNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $format = 'xml';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $mimeType = 'text/xml; charset=UTF-8';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected static $auth = 'cookie';
+
+}
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php b/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php
new file mode 100644
index 0000000..d46b1c82
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php
@@ -0,0 +1,158 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional\EntityResource;
+
+use Drupal\Core\Config\Entity\ConfigEntityInterface;
+use Drupal\Core\Entity\FieldableEntityInterface;
+use Drupal\Core\Field\Plugin\Field\FieldType\BooleanItem;
+use Drupal\Core\Field\Plugin\Field\FieldType\ChangedItem;
+use Drupal\Core\Field\Plugin\Field\FieldType\CreatedItem;
+use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem;
+use Drupal\Core\Field\Plugin\Field\FieldType\IntegerItem;
+use Drupal\Core\Field\Plugin\Field\FieldType\TimestampItem;
+use Drupal\file\Plugin\Field\FieldType\FileItem;
+use Drupal\image\Plugin\Field\FieldType\ImageItem;
+use Drupal\options\Plugin\Field\FieldType\ListIntegerItem;
+use Drupal\path\Plugin\Field\FieldType\PathItem;
+use Drupal\Tests\rest\Functional\XmlNormalizationQuirksTrait;
+
+/**
+ * Trait for EntityResourceTestBase subclasses testing $format='xml'.
+ */
+trait XmlEntityNormalizationQuirksTrait {
+
+  use XmlNormalizationQuirksTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getExpectedNormalizedEntity() {
+    $default_normalization = parent::getExpectedNormalizedEntity();
+
+    if ($this->entity instanceof FieldableEntityInterface) {
+      $normalization = $this->applyXmlFieldDecodingQuirks($default_normalization);
+    }
+    else {
+      $normalization = $this->applyXmlConfigEntityDecodingQuirks($default_normalization);
+    }
+    $normalization = $this->applyXmlDecodingQuirks($normalization);
+
+    return $normalization;
+  }
+
+  /**
+   * Applies the XML entity field encoding quirks that remain after decoding.
+   *
+   * The XML encoding:
+   * - loses type data (int and bool become string)
+   *
+   * @param array $normalization
+   *   An entity normalization.
+   *
+   * @return array
+   *   The updated fieldable entity normalization.
+   *
+   * @see \Symfony\Component\Serializer\Encoder\XmlEncoder
+   */
+  protected function applyXmlFieldDecodingQuirks(array $normalization) {
+    foreach ($this->entity->getFields(TRUE) as $field_name => $field) {
+      // Not every field is accessible.
+      if (!isset($normalization[$field_name])) {
+        continue;
+      }
+
+      for ($i = 0; $i < count($normalization[$field_name]); $i++) {
+        switch ($field->getItemDefinition()->getClass()) {
+          case BooleanItem::class:
+            $value = &$normalization[$field_name][$i]['value'];
+            $value = $value === TRUE ? '1' : '0';
+            break;
+          case IntegerItem::class:
+          case ListIntegerItem::class:
+            $value = &$normalization[$field_name][$i]['value'];
+            $value = (string) $value;
+            break;
+          case PathItem::class:
+            $pid = &$normalization[$field_name][$i]['pid'];
+            $pid = (string) $pid;
+            break;
+          case EntityReferenceItem::class:
+          case FileItem::class:
+            $target_id = &$normalization[$field_name][$i]['target_id'];
+            $target_id = (string) $target_id;
+            break;
+          case ChangedItem::class:
+          case CreatedItem::class:
+          case TimestampItem::class:
+            $value = &$normalization[$field_name][$i]['value'];
+            if (is_numeric($value)) {
+              $value = (string) $value;
+            }
+            break;
+          case ImageItem::class:
+            $height = &$normalization[$field_name][$i]['height'];
+            $height = (string) $height;
+            $width = &$normalization[$field_name][$i]['width'];
+            $width = (string) $width;
+            $target_id = &$normalization[$field_name][$i]['target_id'];
+            $target_id = (string) $target_id;
+            break;
+        }
+      }
+
+      if (!empty($normalization[$field_name])) {
+        $normalization[$field_name] = $normalization[$field_name][0];
+      }
+    }
+
+    return $normalization;
+  }
+
+
+  /**
+   * Applies the XML config entity encoding quirks that remain after decoding.
+   *
+   * The XML encoding:
+   * - loses type data (int and bool become string)
+   * - converts single-item arrays into single items (non-arrays)
+   *
+   * @param array $normalization
+   *   An entity normalization.
+   *
+   * @return array
+   *   The updated config entity normalization.
+   *
+   * @see \Symfony\Component\Serializer\Encoder\XmlEncoder
+   */
+  protected function applyXmlConfigEntityDecodingQuirks(array $normalization) {
+    $normalization = static::castToString($normalization);
+
+    // When a single dependency is listed, it's not decoded into an array.
+    if (isset($normalization['dependencies'])) {
+      foreach ($normalization['dependencies'] as $dependency_type => $dependency_list) {
+        if (count($dependency_list) === 1) {
+          $normalization['dependencies'][$dependency_type] = $dependency_list[0];
+        }
+      }
+    }
+
+    return $normalization;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testPost() {
+    // Deserialization of the XML format is not supported.
+    $this->markTestSkipped();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function testPatch() {
+    // Deserialization of the XML format is not supported.
+    $this->markTestSkipped();
+  }
+
+}
diff --git a/core/modules/rest/tests/src/Functional/XmlNormalizationQuirksTrait.php b/core/modules/rest/tests/src/Functional/XmlNormalizationQuirksTrait.php
new file mode 100644
index 0000000..917e6df
--- /dev/null
+++ b/core/modules/rest/tests/src/Functional/XmlNormalizationQuirksTrait.php
@@ -0,0 +1,63 @@
+<?php
+
+namespace Drupal\Tests\rest\Functional;
+
+/**
+ * Trait for ResourceTestBase subclasses testing $format='xml'.
+ */
+trait XmlNormalizationQuirksTrait {
+
+  /**
+   * Applies the XML encoding quirks that remain after decoding.
+   *
+   * The XML encoding:
+   * - maps empty arrays to the empty string
+   * - maps single-item arrays to just that single item
+   * - restructures multiple-item arrays that lives in a single-item array
+   *
+   * @param array $normalization
+   *   A normalization.
+   *
+   * @return array
+   *   The updated normalization.
+   *
+   * @see \Symfony\Component\Serializer\Encoder\XmlEncoder
+   */
+  protected function applyXmlDecodingQuirks(array $normalization) {
+    foreach ($normalization as $key => $value) {
+      if ($value === [] || $value === NULL) {
+        $normalization[$key] = '';
+      }
+      elseif (is_array($value)) {
+        // Collapse single-item numeric arrays to just the single item.
+        if (count($value) === 1 && is_numeric(array_keys($value)[0]) && is_scalar($value[0])) {
+          $value = $value[0];
+        }
+        // Restructure multiple-item arrays inside a single-item numeric array.
+        // @see \Symfony\Component\Serializer\Encoder\XmlEncoder::buildXml()
+        elseif (count($value) === 1 && is_numeric(array_keys($value)[0]) && is_array(reset($value))) {
+          $rewritten_value = [];
+          foreach ($value[0] as $child_key => $child_value) {
+            if (is_numeric(array_keys(reset($value))[0])) {
+              $rewritten_value[$child_key] = ['@key' => $child_key ] + $child_value;
+            }
+            else {
+              $rewritten_value[$child_key] = $child_value;
+            }
+          }
+          $value = $rewritten_value;
+        }
+
+        // If the post-quirk value is still an array after the above, recurse.
+        if (is_array($value)) {
+          $value = $this->applyXmlDecodingQuirks($value);
+        }
+
+        // Store post-quirk value.
+        $normalization[$key] = $value;
+      }
+    }
+    return $normalization;
+  }
+
+}
