function LayoutBuilderEntityViewDisplayResourceTestBase::getExpectedNormalizedEntity

Same name in other branches
  1. 9 core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php \Drupal\Tests\layout_builder\Functional\Rest\LayoutBuilderEntityViewDisplayResourceTestBase::getExpectedNormalizedEntity()
  2. 8.9.x core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php \Drupal\Tests\layout_builder\Functional\Rest\LayoutBuilderEntityViewDisplayResourceTestBase::getExpectedNormalizedEntity()
  3. 10 core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php \Drupal\Tests\layout_builder\Functional\Rest\LayoutBuilderEntityViewDisplayResourceTestBase::getExpectedNormalizedEntity()

Overrides EntityViewDisplayResourceTestBase::getExpectedNormalizedEntity

File

core/modules/layout_builder/tests/src/Functional/Rest/LayoutBuilderEntityViewDisplayResourceTestBase.php, line 37

Class

LayoutBuilderEntityViewDisplayResourceTestBase
Provides a base class for testing LayoutBuilderEntityViewDisplay resources.

Namespace

Drupal\Tests\layout_builder\Functional\Rest

Code

protected function getExpectedNormalizedEntity() {
    $expected = parent::getExpectedNormalizedEntity();
    array_unshift($expected['dependencies']['module'], 'layout_builder');
    $expected['hidden'][OverridesSectionStorage::FIELD_NAME] = TRUE;
    $expected['third_party_settings']['layout_builder'] = [
        'enabled' => TRUE,
        'allow_custom' => TRUE,
    ];
    return $expected;
}

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