function ProjectCoreCompatibilityTest::providerIsCoreCompatible

Same name and namespace in other branches
  1. 11.x core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php \Drupal\Tests\update\Unit\ProjectCoreCompatibilityTest::providerIsCoreCompatible()

Data provider for testIsCoreCompatible().

File

core/modules/update/tests/src/Unit/ProjectCoreCompatibilityTest.php, line 182

Class

ProjectCoreCompatibilityTest
@coversDefaultClass \Drupal\update\ProjectCoreCompatibility[[api-linebreak]]

Namespace

Drupal\Tests\update\Unit

Code

public static function providerIsCoreCompatible() : array {
  $test_cases['compatible exact'] = [
    '10.3.0',
    '10.3.0',
    TRUE,
  ];
  $test_cases['compatible with OR'] = [
    '^9 || ^10',
    '10.3.0',
    TRUE,
  ];
  $test_cases['incompatible'] = [
    '^10',
    '11.0.0',
    FALSE,
  ];
  $test_cases['broken'] = [
    '^^11',
    '11.0.0',
    FALSE,
  ];
  return $test_cases;
}

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