public function ConfigImporterTest::testMissingCoreExtension in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/config/src/Tests/ConfigImporterTest.php \Drupal\config\Tests\ConfigImporterTest::testMissingCoreExtension()
Tests missing core.extension during configuration import.
See also
\Drupal\Core\EventSubscriber\ConfigImportSubscriber
File
- core/
modules/ config/ src/ Tests/ ConfigImporterTest.php, line 637 - Contains \Drupal\config\Tests\ConfigImporterTest.
Class
- ConfigImporterTest
- Tests importing configuration from files into active configuration.
Namespace
Drupal\config\TestsCode
public function testMissingCoreExtension() {
$sync = $this->container
->get('config.storage.sync');
$sync
->delete('core.extension');
try {
$this->configImporter
->reset()
->import();
$this
->fail('ConfigImporterException not thrown, invalid import was not stopped due to missing dependencies.');
} catch (ConfigImporterException $e) {
$this
->assertEqual($e
->getMessage(), 'There were errors validating the config synchronization.');
$error_log = $this->configImporter
->getErrors();
$this
->assertEqual([
'The core.extension configuration does not exist.',
], $error_log);
}
}