1
0
Fork 0

Add a test for two equivalent installable packages and fix the functional test

pull/9/head
Nils Adermann 2011-08-20 23:05:11 -04:00
parent 03642a40b4
commit ac61c3973b
1 changed files with 18 additions and 2 deletions

View File

@ -165,11 +165,27 @@ class SolverTest extends \PHPUnit_Framework_TestCase
)); ));
} }
public function testInstallOneOfTwoAlternatives()
{
$this->repo->addPackage($packageA = new MemoryPackage('A', '1.0'));
$this->repo->addPackage($packageB = new MemoryPackage('A', '1.0'));
$this->reposComplete();
$this->request->install('A');
$this->checkSolverResult(array(
array('job' => 'install', 'package' => $packageA),
));
}
public function testSolverWithComposerRepo() public function testSolverWithComposerRepo()
{ {
$this->markTestIncomplete();
$this->repoInstalled = new PlatformRepository; $this->repoInstalled = new PlatformRepository;
// overwrite solver with custom installed repo
$this->solver = new Solver($this->policy, $this->pool, $this->repoInstalled);
$this->repo = new ComposerRepository('http://packagist.org'); $this->repo = new ComposerRepository('http://packagist.org');
list($monolog) = $this->repo->getPackages(); list($monolog) = $this->repo->getPackages();