22 private $objectManagerMock;
27 private $fieldMappers;
32 private $fieldMapperEntity;
41 $this->objectManagerMock = $this->getMockBuilder(\
Magento\Framework\ObjectManagerInterface::class)
42 ->disableOriginalConstructor()
44 $this->fieldMapperEntity = $this->getMockBuilder(
45 \
Magento\Elasticsearch\Model\Adapter\FieldMapperInterface::class
47 ->disableOriginalConstructor()
49 $this->fieldMappers = [
50 'product' =>
'productFieldMapper',
54 \
Magento\Elasticsearch\Model\Adapter\FieldMapper\FieldMapperResolver::class,
56 'objectManager' => $this->objectManagerMock,
57 'fieldMappers' => $this->fieldMappers
69 $this->model->getFieldName(
'attribute', [
'entityType' =>
'']);
79 $this->model->getFieldName(
'attribute', [
'entityType' =>
'error']);
89 $this->objectManagerMock->expects($this->once())
92 $this->model->getFieldName(
'attribute', [
'entityType' =>
'product']);
101 $this->objectManagerMock->expects($this->once())
103 ->willReturn($this->fieldMapperEntity);
104 $this->model->getFieldName(
'attribute', []);
113 $this->objectManagerMock->expects($this->once())
115 ->willReturn($this->fieldMapperEntity);
116 $this->model->getAllAttributesTypes([]);
testGetFieldNameWrongType()
testGetAllAttributesTypes()
testGetFieldNameFailure()