function DefaultConfigTest::moduleListDataProvider

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php \Drupal\KernelTests\Config\DefaultConfigTest::moduleListDataProvider()
  2. 11.x core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php \Drupal\KernelTests\Config\DefaultConfigTest::moduleListDataProvider()

A data provider that lists every module in core.

Also adds a deprecated module with config.

Return value

string[][] An array of module names to test, with both key and value being the name of the module.

File

core/tests/Drupal/KernelTests/Config/DefaultConfigTest.php, line 176

Class

DefaultConfigTest
Tests that the installed config matches the default config.

Namespace

Drupal\KernelTests\Config

Code

public static function moduleListDataProvider() : array {
    $modules_keyed = self::coreModuleListDataProvider();
    // Add a deprecated module with config.
    $modules_keyed['deprecated_module'] = [
        'deprecated_module',
    ];
    return $modules_keyed;
}

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