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

Make platform-check only check non-dev requires, refs #9412

This commit is contained in:
Jordi Boggiano 2020-11-04 23:41:58 +01:00
parent 8c1355f448
commit 56c65a58e2
No known key found for this signature in database
GPG key ID: 7BBD42C429EC80BC
8 changed files with 82 additions and 11 deletions

View file

@ -135,6 +135,9 @@ class AutoloadGeneratorTest extends TestCase
return $that->vendorDir.'/'.$package->getName() . ($targetDir ? '/'.$targetDir : '');
}));
$this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock();
$this->repository->expects($this->any())
->method('getDevPackageNames')
->willReturn(array());
$this->eventDispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')
->disableOriginalConstructor()
@ -952,15 +955,15 @@ EOF;
$notAutoloadPackages[] = $b = new Package('b/b', '1.0', '1.0');
$notAutoloadPackages[] = $c = new Package('c/c', '1.0', '1.0');
$this->repository->expects($this->at(0))
$this->repository->expects($this->at(1))
->method('getCanonicalPackages')
->will($this->returnValue($autoloadPackages));
$this->repository->expects($this->at(1))
$this->repository->expects($this->at(3))
->method('getCanonicalPackages')
->will($this->returnValue($notAutoloadPackages));
$this->repository->expects($this->at(2))
$this->repository->expects($this->at(5))
->method('getCanonicalPackages')
->will($this->returnValue($notAutoloadPackages));