mirror of
https://github.com/composer/composer
synced 2025-05-10 17:12:51 +00:00
Changed repository priority in the pool
This commit is contained in:
parent
5b42f99441
commit
2b08df5192
5 changed files with 86 additions and 5 deletions
|
@ -9,7 +9,6 @@
|
|||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Composer\Test\DependencyResolver;
|
||||
|
||||
use Composer\Repository\ArrayRepository;
|
||||
|
@ -70,6 +69,25 @@ class SolverTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testSolverInstallSamePackageFromDifferentRepositories()
|
||||
{
|
||||
$repo1 = new ArrayRepository;
|
||||
$repo2 = new ArrayRepository;
|
||||
|
||||
$repo1->addPackage($foo1 = $this->getPackage('foo', '1'));
|
||||
$repo2->addPackage($foo2 = $this->getPackage('foo', '1'));
|
||||
|
||||
$this->pool->addRepository($this->repoInstalled);
|
||||
$this->pool->addRepository($repo1);
|
||||
$this->pool->addRepository($repo2);
|
||||
|
||||
$this->request->install('foo');
|
||||
|
||||
$this->checkSolverResult(array(
|
||||
array('job' => 'install', 'package' => $foo1),
|
||||
));
|
||||
}
|
||||
|
||||
public function testSolverInstallWithDeps()
|
||||
{
|
||||
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue