function DependencyTest::providerCreateFromString

Same name in other branches
  1. 8.9.x 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()
  3. 11.x 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;
}

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