Add test for choices in circular requirements and delete packagist based test
parent
85f88de59d
commit
30f6c05069
|
@ -249,25 +249,29 @@ class SolverTest extends \PHPUnit_Framework_TestCase
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
public function testInstallAlternativeWithCircularRequire()
|
||||||
public function testSolverWithComposerRepo()
|
|
||||||
{
|
{
|
||||||
$this->repoInstalled = new PlatformRepository;
|
$this->markTestIncomplete();
|
||||||
|
|
||||||
// overwrite solver with custom installed repo
|
$this->repo->addPackage($packageA = new MemoryPackage('A', '1.0'));
|
||||||
$this->solver = new Solver($this->policy, $this->pool, $this->repoInstalled);
|
$this->repo->addPackage($packageB = new MemoryPackage('B', '1.0'));
|
||||||
|
$this->repo->addPackage($packageC = new MemoryPackage('C', '1.0'));
|
||||||
$this->repo = new ComposerRepository('http://packagist.org');
|
$this->repo->addPackage($packageD = new MemoryPackage('D', '1.0'));
|
||||||
list($monolog) = $this->repo->getPackages();
|
$packageA->setRequires(array(new Link('A', 'B', new VersionConstraint('>=', '1.0'), 'requires')));
|
||||||
|
$packageB->setRequires(array(new Link('B', 'Virtual', new VersionConstraint('>=', '1.0'), 'requires')));
|
||||||
|
$packageC->setRequires(array(new Link('C', 'Virtual', new VersionConstraint('==', '1.0'), 'provides')));
|
||||||
|
$packageD->setRequires(array(new Link('D', 'Virtual', new VersionConstraint('==', '1.0'), 'provides')));
|
||||||
|
|
||||||
$this->reposComplete();
|
$this->reposComplete();
|
||||||
|
|
||||||
$this->request->install('Monolog');
|
$this->request->install('A');
|
||||||
|
|
||||||
$this->checkSolverResult(array(
|
$this->checkSolverResult(array(
|
||||||
array('job' => 'install', 'package' => $monolog),
|
array('job' => 'install', 'package' => $packageC),
|
||||||
|
array('job' => 'install', 'package' => $packageB),
|
||||||
|
array('job' => 'install', 'package' => $packageA),
|
||||||
));
|
));
|
||||||
}*/
|
}
|
||||||
|
|
||||||
protected function reposComplete()
|
protected function reposComplete()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue