protected function LayoutBuilderEntityViewDisplayTest::getExpectedDocument in Drupal 9
Same name and namespace in other branches
- 8 core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Functional\Jsonapi\LayoutBuilderEntityViewDisplayTest::getExpectedDocument()
- 10 core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Functional\Jsonapi\LayoutBuilderEntityViewDisplayTest::getExpectedDocument()
Returns the expected JSON:API document for the entity.
Return value
array A JSON:API response document.
Overrides EntityViewDisplayTest::getExpectedDocument
See also
::createEntity()
File
- core/
modules/ layout_builder/ tests/ src/ Functional/ Jsonapi/ LayoutBuilderEntityViewDisplayTest.php, line 43
Class
- LayoutBuilderEntityViewDisplayTest
- JSON:API integration test for the "EntityViewDisplay" config entity type.
Namespace
Drupal\Tests\layout_builder\Functional\JsonapiCode
protected function getExpectedDocument() {
$document = parent::getExpectedDocument();
array_unshift($document['data']['attributes']['dependencies']['module'], 'layout_builder');
$document['data']['attributes']['hidden'][OverridesSectionStorage::FIELD_NAME] = TRUE;
$document['data']['attributes']['third_party_settings']['layout_builder'] = [
'enabled' => TRUE,
'allow_custom' => TRUE,
];
return $document;
}