.../EntityResource/XmlEntityNormalizationQuirksTrait.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php b/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php index ca9ff74..2987fc7 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php @@ -53,10 +53,6 @@ protected function getExpectedNormalizedEntity() { * @see \Symfony\Component\Serializer\Encoder\XmlEncoder */ protected function applyXmlFieldDecodingQuirks(array $normalization) { - if (!$this->entity instanceof FieldableEntityInterface) { - throw new \LogicException('This trait should only be used for fieldable entity types.'); - } - foreach ($this->entity->getFields(TRUE) as $field_name => $field) { // Not every field is accessible. if (!isset($normalization[$field_name])) { @@ -119,10 +115,6 @@ protected function applyXmlFieldDecodingQuirks(array $normalization) { * @see \Symfony\Component\Serializer\Encoder\XmlEncoder */ protected function applyXmlConfigEntityDecodingQuirks(array $normalization) { - if (!$this->entity instanceof ConfigEntityInterface) { - throw new \LogicException('This trait should only be used for config entity types.'); - } - $normalization = static::castToString($normalization); // When a single dependency is listed, it's not decoded into an array.