Add handling for alias operations
parent
f7d5df2764
commit
46972fbc22
|
@ -17,6 +17,8 @@ use Composer\DependencyResolver\Operation\OperationInterface;
|
|||
use Composer\DependencyResolver\Operation\InstallOperation;
|
||||
use Composer\DependencyResolver\Operation\UpdateOperation;
|
||||
use Composer\DependencyResolver\Operation\UninstallOperation;
|
||||
use Composer\DependencyResolver\Operation\MarkAliasInstalledOperation;
|
||||
use Composer\DependencyResolver\Operation\MarkAliasUninstalledOperation;
|
||||
|
||||
class InstallationManagerMock extends InstallationManager
|
||||
{
|
||||
|
@ -47,6 +49,20 @@ class InstallationManagerMock extends InstallationManager
|
|||
$repo->removePackage($operation->getPackage());
|
||||
}
|
||||
|
||||
public function markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)
|
||||
{
|
||||
$this->installed[] = $operation->getPackage();
|
||||
$this->trace[] = (string) $operation;
|
||||
$repo->addPackage(clone $operation->getPackage());
|
||||
}
|
||||
|
||||
public function markAliasUninstalled(RepositoryInterface $repo, MarkAliasUninstalledOperation $operation)
|
||||
{
|
||||
$this->uninstalled[] = $operation->getPackage();
|
||||
$this->trace[] = (string) $operation;
|
||||
$repo->removePackage($operation->getPackage());
|
||||
}
|
||||
|
||||
public function getTrace()
|
||||
{
|
||||
return $this->trace;
|
||||
|
|
Loading…
Reference in New Issue