You are here

public function DependencyTest::providerCreateFromString in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Extension/DependencyTest.php \Drupal\Tests\Core\Extension\DependencyTest::providerCreateFromString()
  2. 10 core/tests/Drupal/Tests/Core/Extension/DependencyTest.php \Drupal\Tests\Core\Extension\DependencyTest::providerCreateFromString()

Data provider for testCreateFromString.

File

core/tests/Drupal/Tests/Core/Extension/DependencyTest.php, line 29

Class

DependencyTest
@coversDefaultClass \Drupal\Core\Extension\Dependency @group Extension

Namespace

Drupal\Tests\Core\Extension

Code

public function providerCreateFromString() {
  $tests = [];
  $tests['module_name_only'] = [
    'views',
    'views',
    '',
    '',
  ];
  $tests['module_and_project_names'] = [
    'drupal:views',
    'views',
    'drupal',
    '',
  ];
  $tests['module_and_constraint'] = [
    'views (<8.x-3.1)',
    'views',
    '',
    '<8.x-3.1',
  ];
  $tests['module_and_project_names_and_constraint'] = [
    'drupal:views (>8.x-1.1)',
    'views',
    'drupal',
    '>8.x-1.1',
  ];
  return $tests;
}