function SemVerTest::testMinimizeConstraintsWhichDoNotIntersect

Tests minimize constraints which do not intersect.

@legacy-covers ::minimizeConstraints

Attributes

#[TestWith([ "^6.1", "^5.1", ">=6.3.0.0-dev, <7.0.0.0-dev", ])]

File

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

Class

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

Namespace

Drupal\Tests\Composer\Plugin\Unpack

Code

public function testMinimizeConstraintsWhichDoNotIntersect(string $constraint_a, string $constraint_b, string $expected) : void {
  $this->expectException(\LogicException::class);
  $this->expectExceptionMessage('The constraints "^6.1" and "^5.1" do not intersect and cannot be minimized.');
  $this->assertSame($expected, SemVer::minimizeConstraints(new VersionParser(), $constraint_a, $constraint_b));
}

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