function LayoutBuilderEntityViewDisplayTest::getExpectedDocument

Same name in other branches
  1. 9 core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Functional\Jsonapi\LayoutBuilderEntityViewDisplayTest::getExpectedDocument()
  2. 8.9.x core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Functional\Jsonapi\LayoutBuilderEntityViewDisplayTest::getExpectedDocument()
  3. 11.x core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Functional\Jsonapi\LayoutBuilderEntityViewDisplayTest::getExpectedDocument()

Overrides EntityViewDisplayTest::getExpectedDocument

File

core/modules/layout_builder/tests/src/Functional/Jsonapi/LayoutBuilderEntityViewDisplayTest.php, line 45

Class

LayoutBuilderEntityViewDisplayTest
JSON:API integration test for the "EntityViewDisplay" config entity type.

Namespace

Drupal\Tests\layout_builder\Functional\Jsonapi

Code

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.