Make the InstallationManagerMock behave like the real class on alias install
parent
3c7fbe9264
commit
9346d4a501
|
@ -56,9 +56,14 @@ class InstallationManagerMock extends InstallationManager
|
||||||
|
|
||||||
public function markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)
|
public function markAliasInstalled(RepositoryInterface $repo, MarkAliasInstalledOperation $operation)
|
||||||
{
|
{
|
||||||
$this->installed[] = $operation->getPackage();
|
$package = $operation->getPackage();
|
||||||
|
|
||||||
|
$this->installed[] = $package;
|
||||||
$this->trace[] = (string) $operation;
|
$this->trace[] = (string) $operation;
|
||||||
$repo->addPackage(clone $operation->getPackage());
|
|
||||||
|
if (!$repo->hasPackage($package)) {
|
||||||
|
$repo->addPackage($package);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function markAliasUninstalled(RepositoryInterface $repo, MarkAliasUninstalledOperation $operation)
|
public function markAliasUninstalled(RepositoryInterface $repo, MarkAliasUninstalledOperation $operation)
|
||||||
|
|
Loading…
Reference in New Issue