Skip to content

Commit 78f84ba

Browse files
author
Oleksandr Gorkun
committed
MAGETWO-99413: Update symfony/console dependency
1 parent 12bd290 commit 78f84ba

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

setup/src/Magento/Setup/Test/Unit/Console/Command/DiCompileCommandTest.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Setup\Test\Unit\Console\Command;
77

88
use Magento\Framework\Component\ComponentRegistrar;
9+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
910
use Magento\Setup\Console\Command\DiCompileCommand;
1011
use Magento\Setup\Module\Di\App\Task\OperationFactory;
1112
use Symfony\Component\Console\Tester\CommandTester;
@@ -121,18 +122,19 @@ public function testExecute()
121122
->method('get')
122123
->with(\Magento\Framework\Config\ConfigOptionsListConstants::KEY_MODULES)
123124
->willReturn(['Magento_Catalog' => 1]);
124-
$progressBar = $this->getMockBuilder(
125-
\Symfony\Component\Console\Helper\ProgressBar::class
126-
)
127-
->disableOriginalConstructor()
128-
->getMock();
125+
126+
$objectManager = new ObjectManager($this);
129127

130128
$this->objectManagerMock->expects($this->once())->method('configure');
131129
$this->objectManagerMock
132130
->expects($this->once())
133131
->method('create')
134132
->with(\Symfony\Component\Console\Helper\ProgressBar::class)
135-
->willReturn($progressBar);
133+
->willReturnCallback(
134+
function ($class, $arguments) use ($objectManager) {
135+
return $objectManager->getObject($class, $arguments);
136+
}
137+
);
136138

137139
$this->managerMock->expects($this->exactly(7))->method('addOperation')
138140
->withConsecutive(

0 commit comments

Comments
 (0)