22 private $objectManagerMock;
26 $this->objectManagerMock = $this->getMockBuilder(\
Magento\Framework\ObjectManagerInterface::class)
29 $objectManagerProviderMock = $this->createMock(\
Magento\
Setup\Model\ObjectManagerProvider::class);
30 $objectManagerProviderMock->expects($this->once())->method(
'get')->willReturn($this->objectManagerMock);
32 $objectManagerProviderMock
43 $operationInstance = $this->getMockBuilder(\
Magento\
Setup\
Module\Di\
App\Task\OperationInterface::class)
46 $this->objectManagerMock->expects($this->once())
49 ->willReturn($operationInstance);
51 $this->assertSame($operationInstance, $this->factory->create(
$alias,
$arguments));
56 $notRegisteredOperation =
'coffee';
58 $this->expectExceptionMessage(
59 sprintf(
'Unrecognized operation "%s"', $notRegisteredOperation),
62 $this->factory->create($notRegisteredOperation);
76 \Magento\Setup\Module\Di\App\Task\Operation\InterceptionCache::class
testCreateSuccess($alias, $arguments, $instanceName)
const AREA_CONFIG_GENERATOR
const UNAVAILABLE_OPERATION