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:
parent
63906171f0
commit
bde9502473
6 changed files with 59 additions and 55 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue