You are here

protected function BaseFieldOverrideResourceTestBase::getExpectedNormalizedEntity in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php \Drupal\FunctionalTests\Rest\BaseFieldOverrideResourceTestBase::getExpectedNormalizedEntity()
  2. 10 core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php \Drupal\FunctionalTests\Rest\BaseFieldOverrideResourceTestBase::getExpectedNormalizedEntity()

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/tests/Drupal/FunctionalTests/Rest/BaseFieldOverrideResourceTestBase.php, line 56

Class

BaseFieldOverrideResourceTestBase

Namespace

Drupal\FunctionalTests\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'bundle' => 'camelids',
    'default_value' => [],
    'default_value_callback' => '',
    'dependencies' => [
      'config' => [
        'node.type.camelids',
      ],
    ],
    'description' => '',
    'entity_type' => 'node',
    'field_name' => 'promote',
    'field_type' => 'boolean',
    'id' => 'node.camelids.promote',
    'label' => NULL,
    'langcode' => 'en',
    'required' => FALSE,
    'settings' => [
      'on_label' => 'On',
      'off_label' => 'Off',
    ],
    'status' => TRUE,
    'translatable' => TRUE,
    'uuid' => $this->entity
      ->uuid(),
  ];
}