protected function ConfigEntityImportTest::doActionUpdate in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php \Drupal\Tests\system\Kernel\Entity\ConfigEntityImportTest::doActionUpdate()
- 9 core/modules/system/tests/src/Kernel/Entity/ConfigEntityImportTest.php \Drupal\Tests\system\Kernel\Entity\ConfigEntityImportTest::doActionUpdate()
Tests updating an action during import.
1 call to ConfigEntityImportTest::doActionUpdate()
- ConfigEntityImportTest::testConfigUpdateImport in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php - Runs test methods for each module within a single test run.
File
- core/
modules/ system/ tests/ src/ Kernel/ Entity/ ConfigEntityImportTest.php, line 59
Class
- ConfigEntityImportTest
- Tests ConfigEntity importing.
Namespace
Drupal\Tests\system\Kernel\EntityCode
protected function doActionUpdate() {
// Create a test action with a known label.
$name = 'system.action.apple';
$entity = Action::create([
'id' => 'apple',
'plugin' => 'action_message_action',
]);
$entity
->save();
$this
->checkSinglePluginConfigSync($entity, 'configuration', 'message', '');
// 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']['message'] = 'Granny Smith';
$this
->assertConfigUpdateImport($name, $original_data, $custom_data);
}