You are here

public function LayoutBuilderEntityViewDisplayTest::testInvalidConfiguration in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testInvalidConfiguration()
  2. 9 core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php \Drupal\Tests\layout_builder\Kernel\LayoutBuilderEntityViewDisplayTest::testInvalidConfiguration()

Tests that configuration schema enforces valid values.

File

core/modules/layout_builder/tests/src/Kernel/LayoutBuilderEntityViewDisplayTest.php, line 38

Class

LayoutBuilderEntityViewDisplayTest
@coversDefaultClass \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay

Namespace

Drupal\Tests\layout_builder\Kernel

Code

public function testInvalidConfiguration() {
  $this
    ->expectException(SchemaIncompleteException::class);
  $this->sectionList
    ->getSection(0)
    ->getComponent('first-uuid')
    ->setConfiguration([
    'id' => 'foo',
    'bar' => 'baz',
  ]);
  $this->sectionList
    ->save();
}