function DrupalCheckIncompatibilityTest::providerDrupalCheckIncompatibility

Data provider for testDrupalCheckIncompatibility.

File

core/tests/Drupal/KernelTests/Core/Common/DrupalCheckIncompatibilityTest.php, line 30

Class

DrupalCheckIncompatibilityTest
Parse a predefined amount of bytes and compare the output with the expected value.

Namespace

Drupal\KernelTests\Core\Common

Code

public function providerDrupalCheckIncompatibility() {
    $module_data = [
        'name' => 'views_ui',
        'original_version' => ' (8.x-1.0)',
        'versions' => [
            [
                'op' => '=',
                'version' => '1.0',
            ],
        ],
    ];
    $data = [];
    $data['is compatible'] = [
        $module_data,
        '1.0',
        NULL,
    ];
    $data['not compatible'] = [
        $module_data,
        '1.1',
        ' (8.x-1.0)',
    ];
    // Prove that the BC layer using ArrayAccess works with
    // drupal_check_incompatibility().
    $dependency = new Dependency('views', 'drupal', '8.x-1.2');
    $data['dependency object'] = [
        $dependency,
        '1.1',
        ' (8.x-1.2)',
    ];
    return $data;
}

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