assertModuleSuccessfullyInstalled example



    // Install the Help module, and verify it installed successfully.     unset($all_modules['help']);
    $this->assertModuleNotInstalled('help');
    $edit = [];
    $edit["modules[help][enable]"] = TRUE;
    $this->drupalGet('admin/modules');
    $this->submitForm($edit, 'Install');
    $this->assertSession()->pageTextContains('has been enabled');
    $this->assertSession()->pageTextContains('hook_modules_installed fired for help');
    $this->assertModuleSuccessfullyInstalled('help');

    // Test help for the required modules.     foreach ($required_modules as $name => $module) {
      $this->assertHelp($name$module->info['name']);
    }

    // Go through each module in the list and try to install and uninstall     // it with its dependencies.     foreach ($all_modules as $name => $module) {
      $was_installed_list = \Drupal::moduleHandler()->getModuleList();

      
Home | Imprint | This part of the site doesn't use cookies.