function SemVerTest::testMinimizeConstraints

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Composer/Plugin/Unpack/SemVerTest.php \Drupal\Tests\Composer\Plugin\Unpack\SemVerTest::testMinimizeConstraints()

Tests minimize constraints.

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 24

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.