function SemVerTest::testMinimizeConstraints

Tests minimize constraints.

@legacy-covers ::minimizeConstraints

Attributes

#[TestWith([ "^6.1", "^6.3", "^6.3", ])] #[TestWith([ "*", "^6.3", "^6.3", ])] #[TestWith([ "^6@dev", "^6.3", "^6.3", ])]

File

core/tests/Drupal/Tests/Composer/Plugin/Unpack/SemVerTest.php, line 26

Class

SemVerTest
Tests Drupal\Composer\Plugin\RecipeUnpack\SemVer.

Namespace

Drupal\Tests\Composer\Plugin\Unpack

Code

public function testMinimizeConstraints(string $constraint_a, string $constraint_b, string $expected) : void {
  $version_parser = new VersionParser();
  $this->assertSame($expected, SemVer::minimizeConstraints($version_parser, $constraint_a, $constraint_b));
  $this->assertSame($expected, SemVer::minimizeConstraints($version_parser, $constraint_b, $constraint_a));
}

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