You are here

public function ConfigImporterTest::testEmptyImportFails in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php \Drupal\KernelTests\Core\Config\ConfigImporterTest::testEmptyImportFails()

Tests that trying to import from an empty sync configuration directory fails.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php, line 86

Class

ConfigImporterTest
Tests importing configuration from files into active configuration.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testEmptyImportFails() {
  $this
    ->expectException(ConfigImporterException::class);
  $this->container
    ->get('config.storage.sync')
    ->deleteAll();
  $this->configImporter
    ->reset()
    ->import();
}