assertModuleTablesExist example

/** * Asserts that a module was successfully installed. * * @param string $name * Name of the module to check. * * @internal */
  protected function assertModuleSuccessfullyInstalled(string $name): void {
    $this->assertModules([$name], TRUE);
    $this->assertModuleTablesExist($name);
    $this->assertModuleConfig($name);
  }

  /** * Uninstalls a module and asserts that it was done correctly. * * @param string $module * The name of the module to uninstall. * @param string $package * (optional) The package of the module to uninstall. Defaults * to 'Core'. * * @internal */
return FALSE;
      }
      return TRUE;
    });

    // Install every module possible.     \Drupal::service('module_installer')->install(array_keys($all_modules));

    $this->assertModules(array_keys($all_modules), TRUE);
    foreach ($all_modules as $module => $info) {
      $this->assertModuleConfig($module);
      $this->assertModuleTablesExist($module);
    }

    // Export active config to sync.     $this->copyConfig($this->container->get('config.storage')$this->container->get('config.storage.sync'));

    $this->resetAll();

    // Delete all entities provided by modules that prevent uninstallation. For     // example, if any content entity exists its provider cannot be uninstalled.     // So deleting all taxonomy terms allows the Taxonomy to be uninstalled.     // Additionally, every field is deleted so modules can be uninstalled. For
Home | Imprint | This part of the site doesn't use cookies.