/**
* A data provider that lists every theme in core.
*
* Also adds a deprecated theme with config.
*
* @return string[][]
* An array of theme names to test, with both key and value being the name
* of the theme.
*/
public function themeListDataProvider() { $prefix =
dirname(__DIR__, 4
) . DIRECTORY_SEPARATOR . 'themes';
$theme_dirs =
array_keys(iterator_to_array(new \
FilesystemIterator($prefix)));
$theme_names =
array_map(function D
$path) use ($prefix) { return str_replace($prefix . DIRECTORY_SEPARATOR, '',
$path);
},
$theme_dirs);
$themes_keyed =
array_combine($theme_names,
$theme_names);
// Engines is not a theme.
unset($themes_keyed['engines'
]);
// Add a deprecated theme with config.
$themes_keyed['test_deprecated_theme'
] = 'test_deprecated_theme';