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

Made the constraint argument in Link mandatory

This commit is contained in:
Yanick Witschi 2020-05-01 20:32:17 +02:00 committed by Jordi Boggiano
parent 63906171f0
commit bde9502473
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
6 changed files with 59 additions and 55 deletions

View file

@ -16,6 +16,7 @@ use Composer\Repository\InstalledRepository;
use Composer\Repository\ArrayRepository;
use Composer\Repository\InstalledArrayRepository;
use Composer\Package\Link;
use Composer\Semver\Constraint\EmptyConstraint;
use Composer\Test\TestCase;
class InstalledRepositoryTest extends TestCase
@ -30,8 +31,8 @@ class InstalledRepositoryTest extends TestCase
$arrayRepoTwo->addPackage($bar = $this->getPackage('bar', '1'));
$arrayRepoTwo->addPackage($bar2 = $this->getPackage('bar', '2'));
$foo->setReplaces(array(new Link('foo', 'provided')));
$bar2->setProvides(array(new Link('bar', 'provided')));
$foo->setReplaces(array(new Link('foo', 'provided', new EmptyConstraint())));
$bar2->setProvides(array(new Link('bar', 'provided', new EmptyConstraint())));
$repo = new InstalledRepository(array($arrayRepoOne, $arrayRepoTwo));