You are here

public function BlockPageSettingTest::testUpdateActionPlugins in Drupal 8

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']);
}