function ConfigImporterTest::testEmptyImportFails in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/config/src/Tests/ConfigImporterTest.php \Drupal\config\Tests\ConfigImporterTest::testEmptyImportFails()
Tests that trying to import from an empty sync configuration directory fails.
File
- core/
modules/ config/ src/ Tests/ ConfigImporterTest.php, line 86 - Contains \Drupal\config\Tests\ConfigImporterTest.
Class
- ConfigImporterTest
- Tests importing configuration from files into active configuration.
Namespace
Drupal\config\TestsCode
function testEmptyImportFails() {
try {
$this->container
->get('config.storage.sync')
->deleteAll();
$this->configImporter
->reset()
->import();
$this
->fail('ConfigImporterException thrown, successfully stopping an empty import.');
} catch (ConfigImporterException $e) {
$this
->pass('ConfigImporterException thrown, successfully stopping an empty import.');
}
}