protected function setUp() { $this->initClient(); $this->loadFixtures(['OroCRM\\Bundle\\MagentoBundle\\Tests\\Functional\\Fixture\\LoadNewsletterSubscriberData']); $this->strategy = $this->getContainer()->get('orocrm_magento.import_strategy.newsletter_subscriber_with_customer.add_or_update'); $this->stepExecution = new StepExecution('step', new JobExecution()); $this->context = new StepExecutionProxyContext($this->stepExecution); $this->context->setValue('itemData', ['itemProp' => 'itemValue']); $this->strategy->setImportExportContext($this->context); $this->strategy->setStepExecution($this->stepExecution); }
public function testGetFailureExceptions() { $exceptions = array(array('message' => 'Error 1'), array('message' => 'Error 2')); $expected = array('Error 1', 'Error 2'); $this->stepExecution->expects($this->once())->method('getFailureExceptions')->will($this->returnValue($exceptions)); $this->assertEquals($expected, $this->context->getFailureExceptions()); }