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

Removed duplication of logic of an installation manager in a plugin manager

This commit is contained in:
Martin Hasoň 2013-09-12 13:28:17 +02:00
parent b86b8a597e
commit e949038c0f
2 changed files with 15 additions and 22 deletions

View file

@ -52,6 +52,13 @@ class PluginInstallerTest extends \PHPUnit_Framework_TestCase
->method('getLocalRepository')
->will($this->returnValue($this->repository));
$im = $this->getMock('Composer\Installer\InstallationManager');
$im->expects($this->any())
->method('getInstallPath')
->will($this->returnCallback(function ($package) {
return __DIR__.'/Fixtures/'.$package->getPrettyName();
}));
$this->io = $this->getMock('Composer\IO\IOInterface');
$dispatcher = $this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock();
@ -62,6 +69,7 @@ class PluginInstallerTest extends \PHPUnit_Framework_TestCase
$this->composer->setConfig($config);
$this->composer->setDownloadManager($dm);
$this->composer->setRepositoryManager($rm);
$this->composer->setInstallationManager($im);
$this->composer->setAutoloadGenerator($this->autoloadGenerator);
$this->pm = new PluginManager($this->composer, $this->io);