You are here

protected function FeedTest::getPostDocument in JSON:API 8.2

Same name and namespace in other branches
  1. 8 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

tests/src/Functional/FeedTest.php, line 146

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',
      ],
    ],
  ];
}