当前位置: 首页>>代码示例>>PHP>>正文


PHP StepExecution::expects方法代码示例

本文整理汇总了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));
 }
开发者ID:antrampa,项目名称:crm,代码行数:12,代码来源:MagentoConnectorTestCase.php

示例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');
 }
开发者ID:ramunasd,项目名称:platform,代码行数:12,代码来源:AbstractConnectorTest.php

示例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();
 }
开发者ID:antrampa,项目名称:crm,代码行数:16,代码来源:AbstractStrategyTest.php

示例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));
 }
开发者ID:antrampa,项目名称:crm,代码行数:19,代码来源:AbstractInfoReaderTest.php


注:本文中的Akeneo\Bundle\BatchBundle\Entity\StepExecution::expects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。