|
|
@ -13,7 +13,6 @@
|
|
|
|
namespace Composer\Test\DependencyResolver;
|
|
|
|
namespace Composer\Test\DependencyResolver;
|
|
|
|
|
|
|
|
|
|
|
|
use Composer\DependencyResolver\Request;
|
|
|
|
use Composer\DependencyResolver\Request;
|
|
|
|
use Composer\DependencyResolver\Pool;
|
|
|
|
|
|
|
|
use Composer\Repository\ArrayRepository;
|
|
|
|
use Composer\Repository\ArrayRepository;
|
|
|
|
use Composer\TestCase;
|
|
|
|
use Composer\TestCase;
|
|
|
|
|
|
|
|
|
|
|
@ -21,7 +20,6 @@ class RequestTest extends TestCase
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public function testRequestInstallAndRemove()
|
|
|
|
public function testRequestInstallAndRemove()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$pool = new Pool;
|
|
|
|
|
|
|
|
$repo = new ArrayRepository;
|
|
|
|
$repo = new ArrayRepository;
|
|
|
|
$foo = $this->getPackage('foo', '1');
|
|
|
|
$foo = $this->getPackage('foo', '1');
|
|
|
|
$bar = $this->getPackage('bar', '1');
|
|
|
|
$bar = $this->getPackage('bar', '1');
|
|
|
@ -30,9 +28,8 @@ class RequestTest extends TestCase
|
|
|
|
$repo->addPackage($foo);
|
|
|
|
$repo->addPackage($foo);
|
|
|
|
$repo->addPackage($bar);
|
|
|
|
$repo->addPackage($bar);
|
|
|
|
$repo->addPackage($foobar);
|
|
|
|
$repo->addPackage($foobar);
|
|
|
|
$pool->addRepository($repo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$request = new Request($pool);
|
|
|
|
$request = new Request();
|
|
|
|
$request->install('foo');
|
|
|
|
$request->install('foo');
|
|
|
|
$request->fix('bar');
|
|
|
|
$request->fix('bar');
|
|
|
|
$request->remove('foobar');
|
|
|
|
$request->remove('foobar');
|
|
|
@ -48,7 +45,6 @@ class RequestTest extends TestCase
|
|
|
|
|
|
|
|
|
|
|
|
public function testRequestInstallSamePackageFromDifferentRepositories()
|
|
|
|
public function testRequestInstallSamePackageFromDifferentRepositories()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$pool = new Pool;
|
|
|
|
|
|
|
|
$repo1 = new ArrayRepository;
|
|
|
|
$repo1 = new ArrayRepository;
|
|
|
|
$repo2 = new ArrayRepository;
|
|
|
|
$repo2 = new ArrayRepository;
|
|
|
|
|
|
|
|
|
|
|
@ -58,10 +54,7 @@ class RequestTest extends TestCase
|
|
|
|
$repo1->addPackage($foo1);
|
|
|
|
$repo1->addPackage($foo1);
|
|
|
|
$repo2->addPackage($foo2);
|
|
|
|
$repo2->addPackage($foo2);
|
|
|
|
|
|
|
|
|
|
|
|
$pool->addRepository($repo1);
|
|
|
|
$request = new Request();
|
|
|
|
$pool->addRepository($repo2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$request = new Request($pool);
|
|
|
|
|
|
|
|
$request->install('foo', $constraint = $this->getVersionConstraint('=', '1'));
|
|
|
|
$request->install('foo', $constraint = $this->getVersionConstraint('=', '1'));
|
|
|
|
|
|
|
|
|
|
|
|
$this->assertEquals(
|
|
|
|
$this->assertEquals(
|
|
|
@ -74,8 +67,7 @@ class RequestTest extends TestCase
|
|
|
|
|
|
|
|
|
|
|
|
public function testUpdateAll()
|
|
|
|
public function testUpdateAll()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$pool = new Pool;
|
|
|
|
$request = new Request();
|
|
|
|
$request = new Request($pool);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$request->updateAll();
|
|
|
|
$request->updateAll();
|
|
|
|
|
|
|
|
|
|
|
|