function EventWithPackageListTraitTest::providerGetPackages

Data provider for testGetPackages().

Return value

mixed[] The test cases.

File

core/modules/package_manager/tests/src/Unit/EventWithPackageListTraitTest.php, line 52

Class

EventWithPackageListTraitTest
@covers \Drupal\package_manager\Event\EventWithPackageListTrait[[api-linebreak]] @group package_manager @internal

Namespace

Drupal\Tests\package_manager\Unit

Code

public static function providerGetPackages() : array {
  return [
    'Package with constraint' => [
      [
        'drupal/new_package:^8.1',
      ],
      [
        'drupal/dev_package:^9',
      ],
      [
        'drupal/new_package' => '^8.1',
      ],
      [
        'drupal/dev_package' => '^9',
      ],
    ],
    'Package without constraint' => [
      [
        'drupal/new_package',
      ],
      [
        'drupal/dev_package',
      ],
      [
        'drupal/new_package' => '*',
      ],
      [
        'drupal/dev_package' => '*',
      ],
    ],
  ];
}

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