protected function XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity in Drupal 10
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php \Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity()
- 9 core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php \Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity()
File
- core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ XmlEntityNormalizationQuirksTrait.php, line 29
Class
- XmlEntityNormalizationQuirksTrait
- Trait for EntityResourceTestBase subclasses testing $format='xml'.
Namespace
Drupal\Tests\rest\Functional\EntityResourceCode
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;
}