You are here

protected function PathAliasResourceTestBase::getExpectedNormalizedEntity in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php \Drupal\Tests\path_alias\Functional\Rest\PathAliasResourceTestBase::getExpectedNormalizedEntity()
  2. 9 core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php \Drupal\Tests\path_alias\Functional\Rest\PathAliasResourceTestBase::getExpectedNormalizedEntity()

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/modules/path_alias/tests/src/Functional/Rest/PathAliasResourceTestBase.php, line 61

Class

PathAliasResourceTestBase
Base class for path_alias EntityResource tests.

Namespace

Drupal\Tests\path_alias\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'id' => [
      [
        'value' => 1,
      ],
    ],
    'revision_id' => [
      [
        'value' => 1,
      ],
    ],
    'langcode' => [
      [
        'value' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
      ],
    ],
    'path' => [
      [
        'value' => '/<front>',
      ],
    ],
    'alias' => [
      [
        'value' => '/frontpage1',
      ],
    ],
    'status' => [
      [
        'value' => TRUE,
      ],
    ],
    'uuid' => [
      [
        'value' => $this->entity
          ->uuid(),
      ],
    ],
  ];
}