Skip to content

Commit e871276

Browse files
author
Bohdan Korablov
committed
MAGETWO-59256: [GitHub] Custom composer modules break Component Manager #6718
1 parent 7352b7c commit e871276

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

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

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,9 @@ public function setUp()
6666
->disableOriginalConstructor()
6767
->getMock();
6868
$objectManager = $this->getMockForAbstractClass(\Magento\Framework\ObjectManagerInterface::class);
69-
$applicationFactory = $this->getMock(
70-
\Magento\Framework\Composer\MagentoComposerApplicationFactory::class,
71-
[],
72-
[],
73-
'',
74-
false
75-
);
69+
$appFactory = $this->getMockBuilder(\Magento\Framework\Composer\MagentoComposerApplicationFactory::class)
70+
->disableOriginalConstructor()
71+
->getMock();
7672
$application = $this->getMock(\Magento\Composer\MagentoComposerApplication::class, [], [], '', false);
7773
$application->expects($this->any())
7874
->method('runComposerCommand')
@@ -105,11 +101,11 @@ public function setUp()
105101
'versions: 3.0.1'
106102
],
107103
]);
108-
$applicationFactory->expects($this->any())->method('create')->willReturn($application);
104+
$appFactory->expects($this->any())->method('create')->willReturn($application);
109105
$objectManager->expects($this->any())
110106
->method('get')
111107
->with(\Magento\Framework\Composer\MagentoComposerApplicationFactory::class)
112-
->willReturn($applicationFactory);
108+
->willReturn($appFactory);
113109
$this->objectManagerProvider->expects($this->any())->method('get')->willReturn($objectManager);
114110

115111
$directoryWrite = $this->getMockForAbstractClass(\Magento\Framework\Filesystem\Directory\WriteInterface::class);

0 commit comments

Comments
 (0)