本文整理汇总了PHP中Akeneo\Bundle\BatchBundle\Entity\StepExecution::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP StepExecution::expects方法的具体用法?PHP StepExecution::expects怎么用?PHP StepExecution::expects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Akeneo\Bundle\BatchBundle\Entity\StepExecution
的用法示例。
在下文中一共展示了StepExecution::expects方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
protected function setUp()
{
$this->transportMock = $this->getMock('OroCRM\\Bundle\\MagentoBundle\\Provider\\Transport\\MagentoTransportInterface');
$this->stepExecutionMock = $this->getMockBuilder('Akeneo\\Bundle\\BatchBundle\\Entity\\StepExecution')->setMethods(['getExecutionContext', 'getJobExecution'])->disableOriginalConstructor()->getMock();
$this->executionContextMock = $this->getMock('Akeneo\\Bundle\\BatchBundle\\Item\\ExecutionContext');
$this->jobExecutionMock = $this->getMock('Akeneo\\Bundle\\BatchBundle\\Entity\\JobExecution');
$this->jobExecutionMock->expects($this->any())->method('getExecutionContext')->will($this->returnValue($this->executionContextMock));
$this->stepExecutionMock->expects($this->any())->method('getJobExecution')->will($this->returnValue($this->jobExecutionMock));
$this->managerRegistryMock = $this->getMockBuilder('Doctrine\\Common\\Persistence\\ManagerRegistry')->disableOriginalConstructor()->getMock();
$this->integrationRepositoryMock = $this->getMockBuilder('Oro\\Bundle\\IntegrationBundle\\Entity\\Repository\\ChannelRepository')->disableOriginalConstructor()->getMock();
$this->managerRegistryMock->expects($this->any())->method('getRepository')->with('OroIntegrationBundle:Channel')->will($this->returnValue($this->integrationRepositoryMock));
}
示例2: setUp
protected function setUp()
{
$this->stepExecutionMock = $this->getMockBuilder('Akeneo\\Bundle\\BatchBundle\\Entity\\StepExecution')->setMethods(['getExecutionContext', 'getJobExecution'])->disableOriginalConstructor()->getMock();
$jobExecution = $this->getMock('Akeneo\\Bundle\\BatchBundle\\Entity\\JobExecution');
$jobInstance = $this->getMock('Akeneo\\Bundle\\BatchBundle\\Entity\\JobInstance');
$jobExecution->expects($this->any())->method('getJobInstance')->will($this->returnValue($jobInstance));
$this->stepExecutionMock->expects($this->any())->method('getJobExecution')->will($this->returnValue($jobExecution));
$jobInstance->expects($this->any())->method('getAlias')->will($this->returnValue('alias'));
$this->transportSettings = $this->getMockForAbstractClass('Oro\\Bundle\\IntegrationBundle\\Entity\\Transport');
$this->transportMock = $this->getMock('Oro\\Bundle\\IntegrationBundle\\Provider\\TransportInterface');
$this->transportMock->expects($this->any())->method('getTest');
}
示例3: setUp
protected function setUp()
{
$this->eventDispatcher = $this->getMock('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->fieldHelper = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Field\\FieldHelper')->disableOriginalConstructor()->getMock();
$this->fieldHelper->expects($this->any())->method('getIdentityValues')->willReturn([]);
$this->fieldHelper->expects($this->any())->method('getFields')->willReturn([]);
$this->databaseHelper = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Field\\DatabaseHelper')->disableOriginalConstructor()->getMock();
$this->strategyHelper = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Strategy\\Import\\ImportStrategyHelper')->disableOriginalConstructor()->getMock();
$this->defaultOwnerHelper = $this->getMockBuilder('Oro\\Bundle\\IntegrationBundle\\ImportExport\\Helper\\DefaultOwnerHelper')->disableOriginalConstructor()->getMock();
$this->channelHelper = $this->getMockBuilder('OroCRM\\Bundle\\ChannelBundle\\ImportExport\\Helper\\ChannelHelper')->disableOriginalConstructor()->getMock();
$this->addressHelper = $this->getMockBuilder('OroCRM\\Bundle\\MagentoBundle\\ImportExport\\Strategy\\StrategyHelper\\AddressImportHelper')->disableOriginalConstructor()->getMock();
$this->stepExecution = $this->getMockBuilder('Akeneo\\Bundle\\BatchBundle\\Entity\\StepExecution')->disableOriginalConstructor()->getMock();
$this->jobExecution = $this->getMockBuilder('Akeneo\\Bundle\\BatchBundle\\Entity\\JobExecution')->disableOriginalConstructor()->getMock();
$this->stepExecution->expects($this->any())->method('getJobExecution')->will($this->returnValue($this->jobExecution));
$this->logger = new NullLogger();
}
示例4: setUp
protected function setUp()
{
$this->contextRegistry = $this->getMock('Oro\\Bundle\\ImportExportBundle\\Context\\ContextRegistry');
$this->logger = new LoggerStrategy(new NullLogger());
$this->contextMediator = $this->getMockBuilder('Oro\\Bundle\\IntegrationBundle\\Provider\\ConnectorContextMediator')->disableOriginalConstructor()->getMock();
$this->stepExecutionMock = $this->getMockBuilder('Akeneo\\Bundle\\BatchBundle\\Entity\\StepExecution')->disableOriginalConstructor()->getMock();
$this->context = $this->getMock('Oro\\Bundle\\ImportExportBundle\\Context\\ContextInterface');
$this->contextRegistry->expects($this->any())->method('getByStepExecution')->will($this->returnValue($this->context));
$channel = $this->getMock('Oro\\Bundle\\IntegrationBundle\\Entity\\Channel');
$transportSettings = $this->getMockForAbstractClass('Oro\\Bundle\\IntegrationBundle\\Entity\\Transport');
$channel->expects($this->any())->method('getTransport')->will($this->returnValue($transportSettings));
$this->transport = $this->getMock('OroCRM\\Bundle\\MagentoBundle\\Provider\\Transport\\MagentoTransportInterface');
$this->contextMediator->expects($this->any())->method('getInitializedTransport')->will($this->returnValue($this->transport));
$this->contextMediator->expects($this->any())->method('getChannel')->will($this->returnValue($channel));
$this->executionContext = $this->getMock('Akeneo\\Bundle\\BatchBundle\\Item\\ExecutionContext');
$this->jobExecution = $this->getMock('Akeneo\\Bundle\\BatchBundle\\Entity\\JobExecution');
$this->jobExecution->expects($this->any())->method('getExecutionContext')->will($this->returnValue($this->executionContext));
$this->stepExecutionMock->expects($this->once())->method('getJobExecution')->will($this->returnValue($this->jobExecution));
}