1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Merge branch '2.2' into main

This commit is contained in:
Jordi Boggiano 2022-03-15 13:10:31 +01:00
commit 5122bd42fb
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
18 changed files with 219 additions and 48 deletions

View file

@ -99,6 +99,34 @@ class PackageSorterTest extends TestCase
'foo/bar6',
),
),
'circular deps sorted alphabetically if weighted equally' => array(
array(
$this->createPackage('foo/bar1', array('circular/part1')),
$this->createPackage('foo/bar2', array('circular/part2')),
$this->createPackage('circular/part1', array('circular/part2')),
$this->createPackage('circular/part2', array('circular/part1')),
),
array(
'circular/part1',
'circular/part2',
'foo/bar1',
'foo/bar2',
),
),
'equal weight sorted alphabetically' => array(
array(
$this->createPackage('foo/bar10', array('foo/dep')),
$this->createPackage('foo/bar2', array('foo/dep')),
$this->createPackage('foo/baz', array('foo/dep')),
$this->createPackage('foo/dep', array()),
),
array(
'foo/dep',
'foo/bar2',
'foo/bar10',
'foo/baz',
),
),
);
}