1
0
Fork 0

Expand test to avoid regressions

pull/10960/head
Jordi Boggiano 2022-07-21 11:08:41 +02:00
parent 9fbc386a7b
commit 8352ab8eb7
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 1 deletions

View File

@ -61,13 +61,15 @@ class VersionSelectorTest extends TestCase
$versionSelector = new VersionSelector($repositorySet, $platform); $versionSelector = new VersionSelector($repositorySet, $platform);
$parser = new VersionParser; $parser = new VersionParser;
$package0 = $this->getPackage('foo/bar', '0.9.0');
$package0->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.6'), Link::TYPE_REQUIRE, '>=5.6')));
$package1 = $this->getPackage('foo/bar', '1.0.0'); $package1 = $this->getPackage('foo/bar', '1.0.0');
$package1->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.4'), Link::TYPE_REQUIRE, '>=5.4'))); $package1->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.4'), Link::TYPE_REQUIRE, '>=5.4')));
$package2 = $this->getPackage('foo/bar', '2.0.0'); $package2 = $this->getPackage('foo/bar', '2.0.0');
$package2->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.6'), Link::TYPE_REQUIRE, '>=5.6'))); $package2->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.6'), Link::TYPE_REQUIRE, '>=5.6')));
$package3 = $this->getPackage('foo/bar', '2.1.0'); $package3 = $this->getPackage('foo/bar', '2.1.0');
$package3->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.6'), Link::TYPE_REQUIRE, '>=5.6'))); $package3->setRequires(array('php' => new Link($packageName, 'php', $parser->parseConstraints('>=5.6'), Link::TYPE_REQUIRE, '>=5.6')));
$packages = array($package1, $package2, $package3); $packages = array($package0, $package1, $package2, $package3);
$repositorySet->expects($this->any()) $repositorySet->expects($this->any())
->method('findPackages') ->method('findPackages')