function ConfigInstallTest::testIdMisMatch

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::testIdMisMatch()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php \Drupal\KernelTests\Core\Config\ConfigInstallTest::testIdMisMatch()
  3. 10 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 267

Class

ConfigInstallTest
Tests installation of configuration objects in installation functionality.

Namespace

Drupal\KernelTests\Core\Config

Code

public function testIdMisMatch() : void {
    $this->expectException(\LogicException::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',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.