31 private $errorMessage =
'Loading composer repositories with package information 32 Updating dependencies (including require-dev) 33 Your requirements could not be resolved to an installable set of packages. 36 - 3rdp/e 1.0.0 requires 3rdp/d 1.0.0 -> no matching package found. 37 - 3rdp/e 1.0.0 requires 3rdp/d 1.0.0 -> no matching package found. 38 - 3rdp/e 1.0.0 requires 3rdp/d 1.0.0 -> no matching package found. 39 - Installation request for 3rdp/e 1.0.0 -> satisfiable by 3rdp/e[1.0.0]. 42 - A typo in the package name 43 - The package is not available in a stable-enough version according to your minimum-stability setting 44 see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details. 46 Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.';
51 private $packageInfo = [
53 'descrip.' =>
'Plugin project A',
54 'versions' =>
'* 1.0.0, 1.1.0, 1.2.0',
58 'current_version' =>
'1.0.0',
59 'available_versions' => [
67 $this->application = $this->createMock(\
Magento\Composer\MagentoComposerApplication::class);
68 $this->infoCommand = $this->createMock(\
Magento\Composer\InfoCommand::class);
78 $this->application->expects($this->exactly(2))->method(
'runComposerCommand');
79 $this->requireUpdateDryRunCommand->run([],
'');
88 $this->application->expects($this->at(1))
89 ->method(
'runComposerCommand')
90 ->willThrowException(
new \RuntimeException($this->errorMessage));
91 $this->infoCommand->expects($this->once())->method(
'run')->willReturn($this->packageInfo);
92 $this->requireUpdateDryRunCommand->run([
'3rdp/e 1.2.0'],
'');
$requireUpdateDryRunCommand