You are here

protected function MessageTest::getPostDocument in JSON:API 8.2

Same name and namespace in other branches
  1. 8 tests/src/Functional/MessageTest.php \Drupal\Tests\jsonapi\Functional\MessageTest::getPostDocument()

Returns the JSON:API POST document.

Return value

array A JSON:API request document.

Overrides ResourceTestBase::getPostDocument

See also

::testPostIndividual()

File

tests/src/Functional/MessageTest.php, line 91

Class

MessageTest
JSON:API integration test for the "Message" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function getPostDocument() {
  return [
    'data' => [
      'type' => 'contact_message--camelids',
      'attributes' => [
        'subject' => 'Dramallama',
        'message' => 'http://www.urbandictionary.com/define.php?term=drama%20llama',
      ],
    ],
  ];
}