function ConfigEntityImportTest::assertConfigUpdateImport
Same name in other branches
- 8.9.x core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php \Drupal\Tests\system\Kernel\Entity\ConfigEntityImportTest::assertConfigUpdateImport()
- 10 core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php \Drupal\Tests\system\Kernel\Entity\ConfigEntityImportTest::assertConfigUpdateImport()
- 11.x core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php \Drupal\Tests\system\Kernel\Entity\ConfigEntityImportTest::assertConfigUpdateImport()
Asserts that config entities are updated during import.
@internal
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.
6 calls to ConfigEntityImportTest::assertConfigUpdateImport()
- ConfigEntityImportTest::doActionUpdate in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php - Tests updating an action during import.
- ConfigEntityImportTest::doBlockUpdate in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php - Tests updating a block during import.
- ConfigEntityImportTest::doFilterFormatUpdate in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php - Tests updating a filter format during import.
- ConfigEntityImportTest::doImageStyleUpdate in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php - Tests updating an image style during import.
- ConfigEntityImportTest::doSearchPageUpdate in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php - Tests updating a search page during import.
File
-
core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php, line 260
Class
- ConfigEntityImportTest
- Tests ConfigEntity importing.
Namespace
Drupal\Tests\system\Kernel\EntityCode
public function assertConfigUpdateImport(string $name, array $original_data, array $custom_data) : void {
$this->container
->get('config.storage.sync')
->write($name, $custom_data);
// Verify the active configuration still returns the default values.
$config = $this->config($name);
$this->assertSame($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->assertSame($config->get(), $custom_data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.