1 system.test ModuleTestCase::assertModuleConfigDoesNotExist($module)

Assert that the default config provided by a module is removed.

Parameters

$module: The name of the module.

File

core/modules/system/tests/system.test, line 105
Tests for system.module.

Class

ModuleTestCase
Helper class for module test cases.

Code

function assertModuleConfigDoesNotExist($module) {
  $config_exists = TRUE;
  $config_names = config_get_default_config_names($module);
  if (empty($config_names)) {
    return $this->assert(TRUE, format_string('The @module module does not provide any config.', array('@module' => $module)));
  }

  foreach ($config_names as $config_name) {
    if (config($config_name)->isNew()) {
      $config_exists = FALSE;
      break;
    }
  }

  return $this->assertFalse($config_exists, format_string('None of the config defined by the @module module exists.', array('@module' => $module)));
}