function ThemeInstallerTest::providerTestInstallThemeWithUnmetModuleDependencies

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::providerTestInstallThemeWithUnmetModuleDependencies()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::providerTestInstallThemeWithUnmetModuleDependencies()
  3. 11.x core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php \Drupal\KernelTests\Core\Theme\ThemeInstallerTest::providerTestInstallThemeWithUnmetModuleDependencies()

Data provider for testInstallThemeWithUnmetModuleDependencies().

File

core/tests/Drupal/KernelTests/Core/Theme/ThemeInstallerTest.php, line 202

Class

ThemeInstallerTest
Tests installing and uninstalling of themes.

Namespace

Drupal\KernelTests\Core\Theme

Code

public static function providerTestInstallThemeWithUnmetModuleDependencies() {
    return [
        'theme with uninstalled module dependencies' => [
            'test_theme_depending_on_modules',
            [],
            "Unable to install theme: 'test_theme_depending_on_modules' due to unmet module dependencies: 'test_module_required_by_theme, test_another_module_required_by_theme'.",
        ],
        'theme with a base theme with uninstalled module dependencies' => [
            'test_theme_with_a_base_theme_depending_on_modules',
            [],
            "Unable to install theme: 'test_theme_with_a_base_theme_depending_on_modules' due to unmet module dependencies: 'test_module_required_by_theme, test_another_module_required_by_theme'.",
        ],
        'theme and base theme have uninstalled module dependencies' => [
            'test_theme_mixed_module_dependencies',
            [],
            "Unable to install theme: 'test_theme_mixed_module_dependencies' due to unmet module dependencies: 'help, test_module_required_by_theme, test_another_module_required_by_theme'.",
        ],
        'theme with already installed module dependencies, base theme module dependencies are not installed' => [
            'test_theme_mixed_module_dependencies',
            [
                'help',
            ],
            "Unable to install theme: 'test_theme_mixed_module_dependencies' due to unmet module dependencies: 'test_module_required_by_theme, test_another_module_required_by_theme'.",
        ],
        'theme with module dependencies not installed, base theme module dependencies are already installed, ' => [
            'test_theme_mixed_module_dependencies',
            [
                'test_module_required_by_theme',
                'test_another_module_required_by_theme',
            ],
            "Unable to install theme: 'test_theme_mixed_module_dependencies' due to unmet module dependencies: 'help'.",
        ],
        'theme depending on a module that does not exist' => [
            'test_theme_depending_on_nonexisting_module',
            [],
            "Unable to install theme: 'test_theme_depending_on_nonexisting_module' due to unmet module dependencies: 'test_module_non_existing",
        ],
        'theme depending on an installed but incompatible module' => [
            'test_theme_depending_on_constrained_modules',
            [
                'test_module_compatible_constraint',
                'test_module_incompatible_constraint',
            ],
            "Unable to install theme: Test Module Theme Depends on with Incompatible Constraint (>=8.x-2.x) (incompatible with version 8.x-1.8)",
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.