function ModuleTestBase::assertNoModuleConfig
Same name in this branch
- 8.9.x core/modules/system/tests/src/Functional/Module/ModuleTestBase.php \Drupal\Tests\system\Functional\Module\ModuleTestBase::assertNoModuleConfig()
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Module/ModuleTestBase.php \Drupal\Tests\system\Functional\Module\ModuleTestBase::assertNoModuleConfig()
- 10 core/modules/system/tests/src/Functional/Module/ModuleTestBase.php \Drupal\Tests\system\Functional\Module\ModuleTestBase::assertNoModuleConfig()
- 11.x 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.
Return value
bool TRUE if no configuration was found, FALSE otherwise.
File
-
core/
modules/ system/ src/ Tests/ Module/ ModuleTestBase.php, line 148
Class
- ModuleTestBase
- Helper class for module test cases.
Namespace
Drupal\system\Tests\ModuleCode
public function assertNoModuleConfig($module) {
$names = \Drupal::configFactory()->listAll($module . '.');
return $this->assertFalse($names, new FormattableMarkup('No configuration found for @module module.', [
'@module' => $module,
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.