You are here

protected function FeedTest::getPostDocument in Drupal 9

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

Returns the JSON:API POST document.

Return value

array A JSON:API request document.

Overrides ResourceTestBase::getPostDocument

See also

::testPostIndividual()

File

core/modules/jsonapi/tests/src/Functional/FeedTest.php, line 151

Class

FeedTest
JSON:API integration test for the "Feed" content entity type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected function getPostDocument() {
  return [
    'data' => [
      'type' => 'aggregator_feed--aggregator_feed',
      'attributes' => [
        'title' => 'Feed Resource Post Test',
        'url' => 'http://example.com/feed',
        'refresh' => 900,
        'description' => 'Feed Resource Post Test Description',
      ],
    ],
  ];
}