mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Test a replace link with a null constraint between packages
This commit is contained in:
parent
69ebbf0eac
commit
b1d16a88b7
2 changed files with 16 additions and 1 deletions
|
@ -184,6 +184,21 @@ class SolverTest extends \PHPUnit_Framework_TestCase
|
|||
));
|
||||
}
|
||||
|
||||
public function testSolverObsolete()
|
||||
{
|
||||
$this->repoInstalled->addPackage($packageA = new MemoryPackage('A', '1.0'));
|
||||
$this->repo->addPackage($packageB = new MemoryPackage('B', '1.0'));
|
||||
$packageB->setReplaces(array(new Link('B', 'A', null)));
|
||||
|
||||
$this->reposComplete();
|
||||
|
||||
$this->request->install('B');
|
||||
|
||||
$this->checkSolverResult(array(
|
||||
array('job' => 'update', 'from' => $packageA, 'to' => $packageB),
|
||||
));
|
||||
}
|
||||
|
||||
public function testInstallOneOfTwoAlternatives()
|
||||
{
|
||||
$this->repo->addPackage($packageA = new MemoryPackage('A', '1.0'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue