assertUninstallableTheme example

$all_dependent_modules = array_merge($first_modules$second_modules);
    $this->drupalGet('admin/appearance');
    $assert_module_enabled_message = function D$enabled_modules) {
      $count = count($enabled_modules);
      $module_enabled_text = $count === 1 ? "{$this->testModules[$enabled_modules[0]]} has been enabled." : $count . " modules have been enabled:";
      $this->assertSession()->pageTextContains($module_enabled_text);
    };
    // All the modules should be listed as disabled.     foreach ($all_dependent_modules as $module) {
      $expected_required_list_items[$module] = $this->testModules[$module] . " (disabled)";
    }
    $this->assertUninstallableTheme($expected_required_list_items$theme_name);

    // Enable the first group of dependee modules.     $first_module_form_post = [];
    foreach ($first_modules as $module) {
      $first_module_form_post["modules[$module][enable]"] = 1;
    }
    $this->drupalGet('admin/modules');
    $this->submitForm($first_module_form_post, 'Install');
    $assert_module_enabled_message($first_modules);

    $this->drupalGet('admin/appearance');

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