21 private $objectManagerMock;
28 $this->objectManagerMock = $this->createMock(ObjectManagerInterface::class);
33 'objectManager' => $this->objectManagerMock,
43 $dataCategoryMapMock = $this->createMock(DataCategoryHashMap::class);
44 $dataProductMapMock = $this->createMock(DataProductHashMap::class);
45 $dataProductMapMockOtherCategory = $this->createMock(DataCategoryUsedInProductsHashMap::class);
47 $this->objectManagerMock->expects($this->any())
52 DataCategoryHashMap::class,
57 DataProductHashMap::class,
62 DataCategoryUsedInProductsHashMap::class,
64 $dataProductMapMockOtherCategory
68 $this->assertSame($dataCategoryMapMock, $this->model->getDataMap(DataCategoryHashMap::class, 1));
69 $this->assertSame($dataProductMapMock, $this->model->getDataMap(DataProductHashMap::class, 1));
71 $dataProductMapMockOtherCategory,
72 $this->model->getDataMap(DataCategoryUsedInProductsHashMap::class, 2)
81 $nonInterface = $this->createMock(HashMapPool::class);
83 $this->objectManagerMock->expects($this->any())
85 ->willReturn($nonInterface);
86 $this->expectException(\InvalidArgumentException::class);
87 $this->model->getDataMap(HashMapPool::class, 1);
testGetDataMapException()