You are here

protected function ContactFormResourceTestBase::getExpectedNormalizedEntity in Drupal 9

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

Returns the expected normalization of the entity.

Return value

array

Overrides EntityResourceTestBase::getExpectedNormalizedEntity

See also

::createEntity()

File

core/modules/contact/tests/src/Functional/Rest/ContactFormResourceTestBase.php, line 64

Class

ContactFormResourceTestBase

Namespace

Drupal\Tests\contact\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
  return [
    'dependencies' => [],
    'id' => 'llama',
    'label' => 'Llama',
    'langcode' => 'en',
    'message' => 'Let us know what you think about llamas',
    'recipients' => [
      'llama@example.com',
      'contact@example.com',
    ],
    'redirect' => NULL,
    'reply' => 'Llamas are indeed awesome!',
    'status' => TRUE,
    'uuid' => $this->entity
      ->uuid(),
    'weight' => 0,
  ];
}