protected function setUp() { $this->object = new \stdClass(); $this->context = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Context\\ContextInterface')->setMethods(array('getOption'))->getMockForAbstractClass(); $this->serializer = $this->getMockBuilder('Symfony\\Component\\Serializer\\SerializerInterface')->getMockForAbstractClass(); $this->processor = new ImportProcessor(); $this->processor->setSerializer($this->serializer); $this->processor->setImportExportContext($this->context); }
protected function setUp() { $this->object = new \stdClass(); $this->context = $this->getMockBuilder('Oro\\Bundle\\ImportExportBundle\\Context\\ContextInterface')->setMethods(array('getOption'))->getMockForAbstractClass(); $this->context->expects($this->once())->method('getOption', 'addFailureException')->with('entityName')->will($this->returnValue('\\stdClass')); $this->serializer = $this->getMockBuilder('Symfony\\Component\\Serializer\\SerializerInterface')->getMockForAbstractClass(); $this->serializer->expects($this->once())->method('deserialize')->with($this->item, '\\stdClass', null)->will($this->returnValue($this->object)); $this->processor = new ImportProcessor(); $this->processor->setSerializer($this->serializer); $this->processor->setImportExportContext($this->context); }