You are here

public function ConfigEntityImportTest::assertConfigUpdateImport 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::assertConfigUpdateImport()

Asserts that config entities are updated during import.

Parameters

string $name: The name of the config object.

array $original_data: The original data stored in the config object.

array $custom_data: The new data to store in the config object.

5 calls to ConfigEntityImportTest::assertConfigUpdateImport()
ConfigEntityImportTest::doActionUpdate in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Tests updating a action during import.
ConfigEntityImportTest::doBlockUpdate in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Tests updating a block during import.
ConfigEntityImportTest::doFilterFormatUpdate in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Tests updating a filter format during import.
ConfigEntityImportTest::doImageStyleUpdate in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Tests updating an image style during import.
ConfigEntityImportTest::doSearchPageUpdate in core/modules/system/src/Tests/Entity/ConfigEntityImportTest.php
Tests updating a search page during import.

File

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

Class

ConfigEntityImportTest
Tests ConfigEntity importing.

Namespace

Drupal\system\Tests\Entity

Code

public function assertConfigUpdateImport($name, $original_data, $custom_data) {
  $this->container
    ->get('config.storage.sync')
    ->write($name, $custom_data);

  // Verify the active configuration still returns the default values.
  $config = $this
    ->config($name);
  $this
    ->assertIdentical($config
    ->get(), $original_data);

  // Import.
  $this
    ->configImporter()
    ->import();

  // Verify the values were updated.
  $this->container
    ->get('config.factory')
    ->reset($name);
  $config = $this
    ->config($name);
  $this
    ->assertIdentical($config
    ->get(), $custom_data);
}