1
0
Fork 0
pull/208/merge
Jordi Boggiano 2012-01-15 14:15:53 +01:00
parent 8b1b4527bd
commit 098ba8e583
1 changed files with 19 additions and 0 deletions

View File

@ -115,6 +115,25 @@ class SolverTest extends TestCase
$this->checkSolverResult(array()); $this->checkSolverResult(array());
} }
public function testSolverUpdateDoesOnlyUpdate()
{
$this->repoInstalled->addPackage($packageA = $this->getPackage('A', '1.0'));
$this->repoInstalled->addPackage($packageB = $this->getPackage('B', '1.0'));
$this->repo->addPackage($newPackageB = $this->getPackage('B', '1.1'));
$this->reposComplete();
$packageA->setRequires(array(new Link('A', 'B', new VersionConstraint('>=', '1.0.0.0'), 'requires')));
$this->request->install('A', new VersionConstraint('=', '1.0.0.0'));
$this->request->install('B', new VersionConstraint('=', '1.1.0.0'));
$this->request->update('A', new VersionConstraint('=', '1.0.0.0'));
$this->request->update('B', new VersionConstraint('=', '1.0.0.0'));
$this->checkSolverResult(array(
array('job' => 'update', 'from' => $packageB, 'to' => $newPackageB),
));
}
public function testSolverUpdateSingle() public function testSolverUpdateSingle()
{ {
$this->repoInstalled->addPackage($packageA = $this->getPackage('A', '1.0')); $this->repoInstalled->addPackage($packageA = $this->getPackage('A', '1.0'));