public function ConfigImporterServiceTest::testImportConfigsFiltered 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::testImportConfigsFiltered()
Check that filtered configuration will not be imported.
File
- tests/
src/ Unit/ ConfigImporterServiceTest.php, line 100
Class
- ConfigImporterServiceTest
- Testing configuration importer service.
Namespace
Drupal\Tests\config_import\UnitCode
public function testImportConfigsFiltered() {
// Enable the module which disallows import of some configurations.
$this
->enableModules([
'config_import_test',
]);
// Configuration will be removed from intermediate storage by
// filtering and will no longer available for import.
$this
->expectException(ConfigImporterException::class, 'The %s configuration does not exist\\.', static::TEST_CONFIG);
// Do an import and wait for an exception.
$this
->testImportConfigs();
}