23 private $objectManagerMock;
37 $this->objectManagerMock = $this->getMockBuilder(\
Magento\Framework\ObjectManagerInterface::class)
38 ->disableOriginalConstructor()
40 $this->dataMappers = [
41 'product' =>
'productDataMapper',
45 DataMapperFactory::class,
47 'objectManager' => $this->objectManagerMock,
48 'dataMappers' => $this->dataMappers
59 $this->model->create(
'');
68 $this->model->create(
'wrong');
77 $this->objectManagerMock->expects($this->once())
79 ->willReturn(
new \stdClass());
80 $this->model->create(
'product');
88 $this->objectManagerMock->expects($this->once())
90 ->willReturn($this->createMock(BatchDataMapperInterface::class));
91 $this->assertInstanceOf(BatchDataMapperInterface::class, $this->model->create(
'product'));