3 namespace Drupal\Tests\layout_builder\Kernel;
5 use Drupal\Core\Config\Schema\SchemaIncompleteException;
6 use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
9 * @coversDefaultClass \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay
11 * @group layout_builder
13 class LayoutBuilderEntityViewDisplayTest extends SectionStorageTestBase {
18 protected function getSectionStorage(array $section_data) {
19 $display = LayoutBuilderEntityViewDisplay::create([
20 'targetEntityType' => 'entity_test',
21 'bundle' => 'entity_test',
24 'third_party_settings' => [
26 'sections' => $section_data,
35 * Tests that configuration schema enforces valid values.
37 public function testInvalidConfiguration() {
38 $this->setExpectedException(SchemaIncompleteException::class);
39 $this->sectionStorage->getSection(0)->getComponent('first-uuid')->setConfiguration(['id' => 'foo', 'bar' => 'baz']);
40 $this->sectionStorage->save();