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

Remove use of deprecated getMock method

This commit is contained in:
Jordi Boggiano 2018-04-12 10:24:56 +02:00
parent 036fc44c25
commit 066351c5b9
42 changed files with 279 additions and 272 deletions

View file

@ -80,7 +80,7 @@ class PluginInstallerTest extends TestCase
->disableOriginalConstructor()
->getMock();
$this->repository = $this->getMock('Composer\Repository\InstalledRepositoryInterface');
$this->repository = $this->getMockBuilder('Composer\Repository\InstalledRepositoryInterface')->getMock();
$rm = $this->getMockBuilder('Composer\Repository\RepositoryManager')
->disableOriginalConstructor()
@ -89,14 +89,14 @@ class PluginInstallerTest extends TestCase
->method('getLocalRepository')
->will($this->returnValue($this->repository));
$im = $this->getMock('Composer\Installer\InstallationManager');
$im = $this->getMockBuilder('Composer\Installer\InstallationManager')->getMock();
$im->expects($this->any())
->method('getInstallPath')
->will($this->returnCallback(function ($package) {
return __DIR__.'/Fixtures/'.$package->getPrettyName();
}));
$this->io = $this->getMock('Composer\IO\IOInterface');
$this->io = $this->getMockBuilder('Composer\IO\IOInterface')->getMock();
$dispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock();
$this->autoloadGenerator = new AutoloadGenerator($dispatcher);