public function ConfigUpdaterTest::testImport in Commerce Core 8.2
Tests importing configuration.
File
- tests/
src/ Kernel/ ConfigUpdaterTest.php, line 77
Class
- ConfigUpdaterTest
- Tests the ConfigUpdater class.
Namespace
Drupal\Tests\commerce\KernelCode
public function testImport() {
$config_name = 'commerce_store.commerce_store_type.testing';
$this->configUpdater
->delete([
$config_name,
]);
$result = $this->configUpdater
->import([
$config_name,
]);
$failed = $result
->getFailed();
$succeeded = $result
->getSucceeded();
$this
->assertEmpty($failed);
$this
->assertEquals($succeeded[$config_name], "{$config_name} was successfully imported");
$result = $this->configUpdater
->import([
$config_name,
]);
$failed = $result
->getFailed();
$succeeded = $result
->getSucceeded();
$this
->assertEmpty($succeeded);
$this
->assertEquals($failed[$config_name], "{$config_name} already exists, use revert to update");
}