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:
parent
4f4c299015
commit
a4509d28e7
16 changed files with 158 additions and 126 deletions
|
@ -192,8 +192,8 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '2.0'));
|
||||
|
||||
$packageA->setProvides(array(new Link('A', 'X', new Constraint('==', '1.0'), 'provides')));
|
||||
$packageB->setProvides(array(new Link('B', 'X', new Constraint('==', '1.0'), 'provides')));
|
||||
$packageA->setProvides(array(new Link('A', 'X', new Constraint('==', '1.0'), Link::TYPE_PROVIDE)));
|
||||
$packageB->setProvides(array(new Link('B', 'X', new Constraint('==', '1.0'), Link::TYPE_PROVIDE)));
|
||||
|
||||
$this->repositorySet->addRepository($this->repo);
|
||||
|
||||
|
@ -212,7 +212,7 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = $this->getPackage('B', '2.0'));
|
||||
|
||||
$packageB->setReplaces(array(new Link('B', 'A', new Constraint('==', '1.0'), 'replaces')));
|
||||
$packageB->setReplaces(array(new Link('B', 'A', new Constraint('==', '1.0'), Link::TYPE_REPLACE)));
|
||||
|
||||
$this->repositorySet->addRepository($this->repo);
|
||||
|
||||
|
@ -232,8 +232,8 @@ class DefaultPolicyTest extends TestCase
|
|||
$this->repo->addPackage($packageB = $this->getPackage('vendor-b/replacer', '1.0'));
|
||||
$this->repo->addPackage($packageA = $this->getPackage('vendor-a/replacer', '1.0'));
|
||||
|
||||
$packageA->setReplaces(array(new Link('vendor-a/replacer', 'vendor-a/package', new Constraint('==', '1.0'), 'replaces')));
|
||||
$packageB->setReplaces(array(new Link('vendor-b/replacer', 'vendor-a/package', new Constraint('==', '1.0'), 'replaces')));
|
||||
$packageA->setReplaces(array(new Link('vendor-a/replacer', 'vendor-a/package', new Constraint('==', '1.0'), Link::TYPE_REPLACE)));
|
||||
$packageB->setReplaces(array(new Link('vendor-b/replacer', 'vendor-a/package', new Constraint('==', '1.0'), Link::TYPE_REPLACE)));
|
||||
|
||||
$this->repositorySet->addRepository($this->repo);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue