You are here

abstract protected function ResourceTestBase::getExpectedDocument in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getExpectedDocument()

Returns the expected JSON:API document for the entity.

Return value

array A JSON:API response document.

See also

::createEntity()

4 calls to ResourceTestBase::getExpectedDocument()
ResourceTestBase::doTestSparseFieldSets in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests sparse field sets.
ResourceTestBase::getExpectedGetIndividualResourceResponse in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Gets the expected individual ResourceResponse for GET.
ResourceTestBase::testGetIndividual in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests GETting an individual resource, plus edge cases to ensure good DX.
ResourceTestBase::testRevisions in core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Tests individual and collection revisions.
48 methods override ResourceTestBase::getExpectedDocument()
ActionTest::getExpectedDocument in core/modules/jsonapi/tests/src/Functional/ActionTest.php
Returns the expected JSON:API document for the entity.
BaseFieldOverrideTest::getExpectedDocument in core/modules/jsonapi/tests/src/Functional/BaseFieldOverrideTest.php
Returns the expected JSON:API document for the entity.
BlockContentTest::getExpectedDocument in core/modules/jsonapi/tests/src/Functional/BlockContentTest.php
Returns the expected JSON:API document for the entity.
BlockContentTypeTest::getExpectedDocument in core/modules/jsonapi/tests/src/Functional/BlockContentTypeTest.php
Returns the expected JSON:API document for the entity.
BlockTest::getExpectedDocument in core/modules/jsonapi/tests/src/Functional/BlockTest.php
Returns the expected JSON:API document for the entity.

... See full list

File

core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php, line 442

Class

ResourceTestBase
Subclass this for every JSON:API resource type.

Namespace

Drupal\Tests\jsonapi\Functional

Code

protected abstract function getExpectedDocument();