You are here

public function LayoutBuilderEntityViewDisplayTest::testInvalidConfiguration in Drupal 8

Same name and namespace in other branches
  1. 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 39

Class

LayoutBuilderEntityViewDisplayTest
@coversDefaultClass \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay

Namespace

Drupal\Tests\layout_builder\Kernel

Code

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