Skip to content

Commit 380a5a0

Browse files
committed
MAGETWO-48081: Copyright Year Update
1 parent 0ffb9b0 commit 380a5a0

File tree

2 files changed

+89
-57
lines changed

2 files changed

+89
-57
lines changed

composer.lock

Lines changed: 60 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

setup/src/Magento/Setup/Test/Unit/Model/SystemPackageTest.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ class SystemPackageTest extends \PHPUnit_Framework_TestCase
5050
*/
5151
private $composerInformation;
5252

53-
5453
public function setUp()
5554
{
5655
$this->composerAppFactory = $this->getMock(
@@ -176,6 +175,35 @@ public function testGetPackageVersions()
176175
$this->assertEquals($expected, $this->systemPackage->getPackageVersions());
177176
}
178177

178+
/**
179+
* @expectedException \RuntimeException
180+
* @expectedExceptionMessage System packages not found
181+
*/
182+
public function testGetPackageVersionGitCloned()
183+
{
184+
$package = $this->getMock('\Composer\Package\Package', [], [], '', false);
185+
$this->repository
186+
->expects($this->once())
187+
->method('getPackages')
188+
->willReturn([$package]);
189+
190+
$this->locker->expects($this->once())->method('getLockedRepository')->willReturn($this->repository);
191+
$this->composerInformation->expects($this->any())->method('isSystemPackage')->willReturn(false);
192+
$this->composer->expects($this->once())->method('getLocker')->willReturn($this->locker);
193+
$this->magentoComposerApp->expects($this->once())->method('createComposer')->willReturn($this->composer);
194+
195+
$this->composerAppFactory->expects($this->once())
196+
->method('create')
197+
->willReturn($this->magentoComposerApp);
198+
199+
$this->composerAppFactory->expects($this->once())
200+
->method('createInfoCommand')
201+
->willReturn($this->infoCommand);
202+
203+
$this->systemPackage = new SystemPackage($this->composerAppFactory, $this->composerInformation);
204+
$this->systemPackage->getPackageVersions();
205+
}
206+
179207
/**
180208
* @expectedException \RuntimeException
181209
* @expectedExceptionMessage System package not found

0 commit comments

Comments
 (0)