1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Introduce constants for Composer\Package\Link types

This commit is contained in:
Michael Telgmann 2020-09-15 10:44:28 +02:00
parent 4f4c299015
commit a4509d28e7
No known key found for this signature in database
GPG key ID: 58B3260258E8D84B
16 changed files with 158 additions and 126 deletions

View file

@ -145,11 +145,11 @@ class InstallerTest extends TestCase
$a = $this->getPackage('A', '1.0.0', 'Composer\Package\RootPackage');
$a->setRequires(array(
'b' => new Link('A', 'B', $v = $this->getVersionConstraint('=', '1.0.0'), 'requires', $v->getPrettyString()),
'b' => new Link('A', 'B', $v = $this->getVersionConstraint('=', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
));
$b = $this->getPackage('B', '1.0.0');
$b->setRequires(array(
'a' => new Link('B', 'A', $v = $this->getVersionConstraint('=', '1.0.0'), 'requires', $v->getPrettyString()),
'a' => new Link('B', 'A', $v = $this->getVersionConstraint('=', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
));
$cases[] = array(
@ -165,11 +165,11 @@ class InstallerTest extends TestCase
$a = $this->getPackage('A', '1.0.0', 'Composer\Package\RootPackage');
$a->setRequires(array(
'b' => new Link('A', 'B', $v = $this->getVersionConstraint('=', '1.0.0'), 'requires', $v->getPrettyString()),
'b' => new Link('A', 'B', $v = $this->getVersionConstraint('=', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
));
$b = $this->getPackage('B', '1.0.0');
$b->setRequires(array(
'a' => new Link('B', 'A', $v = $this->getVersionConstraint('=', '1.0.0'), 'requires', $v->getPrettyString()),
'a' => new Link('B', 'A', $v = $this->getVersionConstraint('=', '1.0.0'), Link::TYPE_REQUIRE, $v->getPrettyString()),
));
$cases[] = array(