function ResourceTestBase::getExpectedDocument
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getExpectedDocument()
- 8.9.x core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getExpectedDocument()
- 10 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/ action/ tests/ src/ Functional/ Jsonapi/ ActionTest.php - Returns the expected JSON:API document for the entity.
- ActionTest::getExpectedDocument in core/
modules/ jsonapi/ tests/ src/ Functional/ ActionTest.php - BaseFieldOverrideTest::getExpectedDocument in core/
modules/ jsonapi/ tests/ src/ Functional/ BaseFieldOverrideTest.php - BlockContentTest::getExpectedDocument in core/
modules/ jsonapi/ tests/ src/ Functional/ BlockContentTest.php - BlockContentTypeTest::getExpectedDocument in core/
modules/ jsonapi/ tests/ src/ Functional/ BlockContentTypeTest.php
File
-
core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php, line 451
Class
- ResourceTestBase
- Subclass this for every JSON:API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected abstract function getExpectedDocument();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.