Definition at line 10 of file InfoCommandTest.php.
◆ getCommandOutputDataProvider()
getCommandOutputDataProvider |
( |
| ) |
|
Data provider that returns different input and output for composer info command.
- Returns
- array
Definition at line 76 of file InfoCommandTest.php.
79 'Package not installed' => [
81 descrip. : Plugin project A 83 versions : 1.0.0, 1.1.0 92 'descrip.' =>
'Plugin project A',
93 'versions' =>
'1.0.0, 1.1.0',
97 'current_version' =>
'',
98 'available_versions' => [
108 'Package installed' => [
110 descrip. : Plugin project A 112 versions : 1.0.0, 1.1.0, * 1.1.2, 1.2.0 121 'descrip.' =>
'Plugin project A',
122 'versions' =>
'1.0.0, 1.1.0, * 1.1.2, 1.2.0',
126 'current_version' =>
'1.1.2',
127 'available_versions' => [
◆ setUp()
Definition at line 34 of file InfoCommandTest.php.
36 $this->application = $this->createMock(\
Magento\Composer\MagentoComposerApplication::class);
38 $this->infoCommand =
new InfoCommand($this->application);
◆ testRun()
testRun |
( |
|
$input, |
|
|
|
$output |
|
) |
| |
@dataProvider getCommandOutputDataProvider
Definition at line 44 of file InfoCommandTest.php.
46 $this->application->expects($this->once())->method(
'runComposerCommand')->willReturn($input);
47 $result = $this->infoCommand->run(
'3rdp/a');
◆ testRunInstalled()
Definition at line 51 of file InfoCommandTest.php.
53 $this->application->expects($this->once())->method(
'runComposerCommand')->willReturn($this->installedOutput);
54 $result = $this->infoCommand->run(
'3rdp/a',
true);
58 'descrip.' =>
'Plugin project A',
59 'versions' =>
'* 1.0.0',
63 'current_version' =>
'1.0.0',
64 'available_versions' => [],
◆ $application
◆ $infoCommand
The documentation for this class was generated from the following file: