You are here

public function ConfigInstallTest::testIdMisMatch in Drupal 8

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

Tests installing configuration where the filename and ID do not match.

File

core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php, line 260

Class

ConfigInstallTest
Tests installation of configuration objects in installation functionality.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testIdMisMatch() {
  $this
    ->expectException(Warning::class);
  $this
    ->expectExceptionMessage('The configuration name "config_test.dynamic.no_id_match" does not match the ID "does_not_match"');
  $this
    ->installModules([
    'config_test_id_mismatch',
  ]);
}