function BlockPageSettingTest::testUpdateActionPlugins

Tests existing search block settings upgrade.

See also

search_post_update_block_page()

File

core/modules/search/tests/src/Functional/Update/BlockPageSettingTest.php, line 29

Class

BlockPageSettingTest
Tests search blocks upgrade to default page setting.

Namespace

Drupal\Tests\search\Functional\Update

Code

public function testUpdateActionPlugins() {
    $config = \Drupal::configFactory()->get('block.block.bartik_search');
    $this->assertArrayNotHasKey('page_id', $config->get('settings'));
    $this->runUpdates();
    $config = \Drupal::configFactory()->get('block.block.bartik_search');
    $this->assertSame('', $config->get('settings')['page_id']);
}

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