You are here

protected function MessageResourceTestBase::getNormalizedPostEntity in Drupal 9

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

Returns the normalized POST entity.

Return value

array

Overrides EntityResourceTestBase::getNormalizedPostEntity

See also

::testPost

1 call to MessageResourceTestBase::getNormalizedPostEntity()
MessageHalJsonAnonTest::getNormalizedPostEntity in core/modules/contact/tests/src/Functional/Hal/MessageHalJsonAnonTest.php
Returns the normalized POST entity.
1 method overrides MessageResourceTestBase::getNormalizedPostEntity()
MessageHalJsonAnonTest::getNormalizedPostEntity in core/modules/contact/tests/src/Functional/Hal/MessageHalJsonAnonTest.php
Returns the normalized POST entity.

File

core/modules/contact/tests/src/Functional/Rest/MessageResourceTestBase.php, line 73

Class

MessageResourceTestBase

Namespace

Drupal\Tests\contact\Functional\Rest

Code

protected function getNormalizedPostEntity() {
  return [
    'subject' => [
      [
        'value' => 'Dramallama',
      ],
    ],
    'contact_form' => [
      [
        'target_id' => 'camelids',
      ],
    ],
    'message' => [
      [
        'value' => 'http://www.urbandictionary.com/define.php?term=drama%20llama',
      ],
    ],
  ];
}