You are here

function ModuleTestBase::assertNoModuleConfig in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Module/ModuleTestBase.php \Drupal\system\Tests\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.

2 calls to ModuleTestBase::assertNoModuleConfig()
ConfigImportAllTest::testInstallUninstall in core/modules/config/src/Tests/ConfigImportAllTest.php
Tests that a fixed set of modules can be installed and uninstalled.
InstallUninstallTest::assertSuccessfulUninstall in core/modules/system/src/Tests/Module/InstallUninstallTest.php
Uninstalls a module and asserts that it was done correctly.

File

core/modules/system/src/Tests/Module/ModuleTestBase.php, line 140
Contains \Drupal\system\Tests\Module\ModuleTestBase.

Class

ModuleTestBase
Helper class for module test cases.

Namespace

Drupal\system\Tests\Module

Code

function assertNoModuleConfig($module) {
  $names = \Drupal::configFactory()
    ->listAll($module . '.');
  return $this
    ->assertFalse($names, format_string('No configuration found for @module module.', array(
    '@module' => $module,
  )));
}