function XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity

Same name in other branches
  1. 8.9.x core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php \Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity()
  2. 10 core/modules/rest/tests/src/Functional/EntityResource/XmlEntityNormalizationQuirksTrait.php \Drupal\Tests\rest\Functional\EntityResource\XmlEntityNormalizationQuirksTrait::getExpectedNormalizedEntity()
  3. 11.x 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\EntityResource

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.