public function ConfigImporterServiceTest::testImportConfigs in Config Importer and Tools 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/ConfigImporterServiceTest.php \Drupal\Tests\config_import\Unit\ConfigImporterServiceTest::testImportConfigs()
Check that configuration will be properly imported.
@covers \Drupal\config_import\ConfigImporterService::import
2 calls to ConfigImporterServiceTest::testImportConfigs()
- ConfigImporterServiceTest::testImportConfigsFiltered in tests/
src/ Unit/ ConfigImporterServiceTest.php - Check that filtered configuration will not be imported.
- ConfigImporterServiceTest::testImportConfigsInMaintenanceMode in tests/
src/ Unit/ ConfigImporterServiceTest.php - Check that configuration will be imported in maintenance mode.
File
- tests/
src/ Unit/ ConfigImporterServiceTest.php, line 84
Class
- ConfigImporterServiceTest
- Testing configuration importer service.
Namespace
Drupal\Tests\config_import\UnitCode
public function testImportConfigs() {
// Get an active configurations storage.
$config_storage = $this
->getConfigStorage();
// Remember the value before import which potentially can overwrite it.
$original_value = $config_storage
->read(static::TEST_CONFIG);
// Set the directory to import configurations from.
$this->configImporter
->setDirectory(drupal_get_path('module', 'config_import') . '/tests/config/import');
// Doing the import.
$this->configImporter
->importConfigs([
static::TEST_CONFIG,
]);
static::assertSame($original_value, $config_storage
->read(static::TEST_CONFIG));
}