You are here

public function ModuleTestBase::assertNoModuleConfig in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Module/ModuleTestBase.php \Drupal\Tests\system\Functional\Module\ModuleTestBase::assertNoModuleConfig()
  2. 9 core/modules/system/tests/src/Functional/Module/ModuleTestBase.php \Drupal\Tests\system\Functional\Module\ModuleTestBase::assertNoModuleConfig()

Asserts that no configuration exists for a given module.

Parameters

string $module: The name of the module.

2 calls to ModuleTestBase::assertNoModuleConfig()
DependencyTest::testEnableWithoutDependency in core/modules/system/tests/src/Functional/Module/DependencyTest.php
Attempts to enable the Content Translation module without Language enabled.
InstallUninstallTest::assertSuccessfulUninstall in core/modules/system/tests/src/Functional/Module/InstallUninstallTest.php
Uninstalls a module and asserts that it was done correctly.

File

core/modules/system/tests/src/Functional/Module/ModuleTestBase.php, line 120

Class

ModuleTestBase
Helper class for module test cases.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function assertNoModuleConfig($module) {
  $names = \Drupal::configFactory()
    ->listAll($module . '.');
  $this
    ->assertEmpty($names, new FormattableMarkup('No configuration found for @module module.', [
    '@module' => $module,
  ]));
}