mirror of
https://github.com/composer/composer
synced 2025-05-09 08:32:56 +00:00
Re-install binaries on update/install
Binaries are re-installed after an update/install (ie: removed and then installed)
This commit is contained in:
parent
37a1e12672
commit
e9fc0e6548
14 changed files with 96 additions and 1 deletions
|
@ -240,6 +240,35 @@ class InstallationManagerTest extends \PHPUnit_Framework_TestCase
|
|||
$manager->uninstall($this->repository, $operation);
|
||||
}
|
||||
|
||||
public function testInstallBinary()
|
||||
{
|
||||
$installer = $this->getMockBuilder('Composer\Installer\LibraryInstaller')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
$manager = new InstallationManager();
|
||||
$manager->addInstaller($installer);
|
||||
|
||||
$package = $this->createPackageMock();
|
||||
|
||||
$package
|
||||
->expects($this->once())
|
||||
->method('getType')
|
||||
->will($this->returnValue('library'));
|
||||
|
||||
$installer
|
||||
->expects($this->once())
|
||||
->method('supports')
|
||||
->with('library')
|
||||
->will($this->returnValue(true));
|
||||
|
||||
$installer
|
||||
->expects($this->once())
|
||||
->method('installBinary')
|
||||
->with($package);
|
||||
|
||||
$manager->installBinary($package);
|
||||
}
|
||||
|
||||
private function createInstallerMock()
|
||||
{
|
||||
return $this->getMockBuilder('Composer\Installer\InstallerInterface')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue