function DeprecatedModuleHandlerTest::dependencyProvider

Provider for testing dependency parsing.

File

core/tests/Drupal/Tests/Core/Extension/DeprecatedModuleHandlerTest.php, line 33

Class

DeprecatedModuleHandlerTest
@coversDefaultClass \Drupal\Core\Extension\ModuleHandler @runTestsInSeparateProcesses

Namespace

Drupal\Tests\Core\Extension

Code

public function dependencyProvider() {
    return [
        [
            'system',
            [
                'name' => 'system',
            ],
        ],
        [
            'taxonomy',
            [
                'name' => 'taxonomy',
            ],
        ],
        [
            'views',
            [
                'name' => 'views',
            ],
        ],
        [
            'views_ui(8.x-1.0)',
            [
                'name' => 'views_ui',
                'original_version' => ' (8.x-1.0)',
                'versions' => [
                    [
                        'op' => '=',
                        'version' => '1.0',
                    ],
                ],
            ],
        ],
        
        /* @todo Not supported? Fix this in
              https://www.drupal.org/project/drupal/issues/3001344.
           [
             'views_ui(8.x-1.1-beta)',
             [
               'name' => 'views_ui',
               'original_version' => ' (8.x-1.1-beta)',
               'versions' => [['op' => '=', 'version' => '1.1-beta']],
             ],
           ],*/
[
            'views_ui(8.x-1.1-alpha12)',
            [
                'name' => 'views_ui',
                'original_version' => ' (8.x-1.1-alpha12)',
                'versions' => [
                    [
                        'op' => '=',
                        'version' => '1.1-alpha12',
                    ],
                ],
            ],
        ],
        [
            'views_ui(8.x-1.1-beta8)',
            [
                'name' => 'views_ui',
                'original_version' => ' (8.x-1.1-beta8)',
                'versions' => [
                    [
                        'op' => '=',
                        'version' => '1.1-beta8',
                    ],
                ],
            ],
        ],
        [
            'views_ui(8.x-1.1-rc11)',
            [
                'name' => 'views_ui',
                'original_version' => ' (8.x-1.1-rc11)',
                'versions' => [
                    [
                        'op' => '=',
                        'version' => '1.1-rc11',
                    ],
                ],
            ],
        ],
        [
            'views_ui(8.x-1.12)',
            [
                'name' => 'views_ui',
                'original_version' => ' (8.x-1.12)',
                'versions' => [
                    [
                        'op' => '=',
                        'version' => '1.12',
                    ],
                ],
            ],
        ],
        [
            'views_ui(8.x-1.x)',
            [
                'name' => 'views_ui',
                'original_version' => ' (8.x-1.x)',
                'versions' => [
                    [
                        'op' => '<',
                        'version' => '2.x',
                    ],
                    [
                        'op' => '>=',
                        'version' => '1.x',
                    ],
                ],
            ],
        ],
        [
            'views_ui( <= 8.x-1.x)',
            [
                'name' => 'views_ui',
                'original_version' => ' ( <= 8.x-1.x)',
                'versions' => [
                    [
                        'op' => '<=',
                        'version' => '2.x',
                    ],
                ],
            ],
        ],
        [
            'views_ui(<= 8.x-1.x)',
            [
                'name' => 'views_ui',
                'original_version' => ' (<= 8.x-1.x)',
                'versions' => [
                    [
                        'op' => '<=',
                        'version' => '2.x',
                    ],
                ],
            ],
        ],
        [
            'views_ui( <=8.x-1.x)',
            [
                'name' => 'views_ui',
                'original_version' => ' ( <=8.x-1.x)',
                'versions' => [
                    [
                        'op' => '<=',
                        'version' => '2.x',
                    ],
                ],
            ],
        ],
        [
            'views_ui(>8.x-1.x)',
            [
                'name' => 'views_ui',
                'original_version' => ' (>8.x-1.x)',
                'versions' => [
                    [
                        'op' => '>',
                        'version' => '2.x',
                    ],
                ],
            ],
        ],
        [
            'drupal:views_ui(>8.x-1.x)',
            [
                'project' => 'drupal',
                'name' => 'views_ui',
                'original_version' => ' (>8.x-1.x)',
                'versions' => [
                    [
                        'op' => '>',
                        'version' => '2.x',
                    ],
                ],
            ],
        ],
    ];
}

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