function UserHalJsonAnonTest::getExpectedNormalizedEntity

Overrides UserResourceTestBase::getExpectedNormalizedEntity

File

core/modules/hal/tests/src/Functional/user/UserHalJsonAnonTest.php, line 41

Class

UserHalJsonAnonTest
@group hal @group legacy

Namespace

Drupal\Tests\hal\Functional\user

Code

protected function getExpectedNormalizedEntity() {
  $default_normalization = parent::getExpectedNormalizedEntity();
  $normalization = $this->applyHalFieldNormalization($default_normalization);
  return $normalization + [
    '_links' => [
      'self' => [
        'href' => $this->baseUrl . '/user/3?_format=hal_json',
      ],
      'type' => [
        'href' => $this->baseUrl . '/rest/type/user/user',
      ],
    ],
  ];
}

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