protected function LayoutBuilderEntityViewDisplayResourceTestBase::createEntity in Layout Builder Symmetric Translations 8
Creates the entity to be tested.
Return value
\Drupal\Core\Entity\EntityInterface The entity to be tested.
Overrides EntityViewDisplayResourceTestBase::createEntity
File
- tests/
src/ Functional/ Rest/ LayoutBuilderEntityViewDisplayResourceTestBase.php, line 21
Class
- LayoutBuilderEntityViewDisplayResourceTestBase
- Provides a base class for testing LayoutBuilderEntityViewDisplay resources.
Namespace
Drupal\Tests\layout_builder_st\Functional\RestCode
protected function createEntity() {
/** @var \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay $entity */
$entity = parent::createEntity();
$entity
->enableLayoutBuilder()
->setOverridable()
->save();
$this
->assertCount(1, $entity
->getThirdPartySetting('layout_builder', 'sections'));
return $entity;
}