Skip to content
Snippets Groups Projects
Verified Commit a293ccec authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3422495 by mondrake, smustgrave: Change...

Issue #3422495 by mondrake, smustgrave: Change DefaultConfigTest::moduleListDataProvider and helpers to static
parent 2d9de3fd
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ class DefaultConfigTest extends KernelTestBase {
*
* @dataProvider moduleListDataProvider
*/
public function testModuleConfig($module) {
public function testModuleConfig(string $module): void {
$this->assertExtensionConfig($module, 'module');
}
......@@ -171,8 +171,8 @@ public static function themeListDataProvider() {
* An array of module names to test, with both key and value being the name
* of the module.
*/
public function moduleListDataProvider() {
$modules_keyed = $this->coreModuleListDataProvider();
public static function moduleListDataProvider(): array {
$modules_keyed = self::coreModuleListDataProvider();
// Add a deprecated module with config.
$modules_keyed['deprecated_module'] = ['deprecated_module'];
......
......@@ -13,7 +13,7 @@ trait FileSystemModuleDiscoveryDataProviderTrait {
* @return array
* An array of module names to test.
*/
public function coreModuleListDataProvider() {
public static function coreModuleListDataProvider(): array {
$prefix = dirname(__DIR__, 3) . DIRECTORY_SEPARATOR . 'modules';
$module_dirs = array_keys(iterator_to_array(new \FilesystemIterator($prefix)));
$module_names = array_map(function ($path) use ($prefix) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment