mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Get rid of all the ->at() mock invocations
This commit is contained in:
parent
095c36ecf8
commit
ffd62795bc
56 changed files with 746 additions and 921 deletions
|
@ -181,15 +181,13 @@ class VersionSelectorTest extends TestCase
|
|||
$packages = array($package1, $package2);
|
||||
|
||||
$repositorySet = $this->createMockRepositorySet();
|
||||
$repositorySet->expects($this->at(0))
|
||||
$repositorySet->expects($this->exactly(2))
|
||||
->method('findPackages')
|
||||
->with($packageName, null)
|
||||
->will($this->returnValue($packages));
|
||||
|
||||
$repositorySet->expects($this->at(1))
|
||||
->method('findPackages')
|
||||
->with($packageName, null)
|
||||
->will($this->returnValue(array_reverse($packages)));
|
||||
->willReturnOnConsecutiveCalls(
|
||||
$packages,
|
||||
array_reverse($packages)
|
||||
);
|
||||
|
||||
$versionSelector = new VersionSelector($repositorySet);
|
||||
$best = $versionSelector->findBestCandidate($packageName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue