You are here

protected function ConfigEntityImportTest::doSearchPageUpdate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php \Drupal\system\Tests\Entity\ConfigEntityImportTest::doSearchPageUpdate()

Tests updating a search page during import.

1 call to ConfigEntityImportTest::doSearchPageUpdate()
ConfigEntityImportTest::testConfigUpdateImport in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Runs test methods for each module within a single test run.

File

core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php, line 159
Contains \Drupal\system\Tests\Entity\ConfigEntityImportTest.

Class

ConfigEntityImportTest
Tests ConfigEntity importing.

Namespace

Drupal\system\Tests\Entity

Code

protected function doSearchPageUpdate() {

  // Create a test search page with a known label.
  $name = 'search.page.apple';
  $entity = entity_create('search_page', array(
    'id' => 'apple',
    'plugin' => 'search_extra_type_search',
  ));
  $entity
    ->save();
  $this
    ->checkSinglePluginConfigSync($entity, 'configuration', 'boost', 'bi');

  // Read the existing data, and prepare an altered version in sync.
  $custom_data = $original_data = $this->container
    ->get('config.storage')
    ->read($name);
  $custom_data['configuration']['boost'] = 'asdf';
  $this
    ->assertConfigUpdateImport($name, $original_data, $custom_data);
}