function LayoutBuilderSettingsUpdateTest::testLayoutBuilderPostUpdateExposeFieldBlockSetting

Same name in other branches
  1. 10 core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderSettingsUpdateTest.php \Drupal\Tests\layout_builder\Functional\Update\LayoutBuilderSettingsUpdateTest::testLayoutBuilderPostUpdateExposeFieldBlockSetting()

Tests layout_builder_post_update_default_expose_field_block_setting().

File

core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderSettingsUpdateTest.php, line 31

Class

LayoutBuilderSettingsUpdateTest
Tests creation of layout_builder settings.

Namespace

Drupal\Tests\layout_builder\Functional\Update

Code

public function testLayoutBuilderPostUpdateExposeFieldBlockSetting() : void {
    // Ensure config is not present.
    $config = $this->config('layout_builder.settings');
    $this->assertTrue($config->isNew());
    $this->runUpdates();
    // Ensure config is present and setting is enabled.
    $updated_config = $this->config('layout_builder.settings');
    $this->assertFalse($updated_config->isNew());
    $this->assertTrue($updated_config->get('expose_all_field_blocks'));
}

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