25 $store = $this->getMockBuilder(\
Magento\Store\Model\Store::class)
26 ->setMethods([
'getId'])
27 ->disableOriginalConstructor()
29 $store->expects($this->once())
34 ->setMethods([
'getStore'])
35 ->disableOriginalConstructor()
36 ->getMockForAbstractClass();
52 ->disableOriginalConstructor()
53 ->setMethods([
'select'])
54 ->getMockForAbstractClass();
55 $select = $this->getMockBuilder(\
Magento\Framework\DB\Select::class)
56 ->disableOriginalConstructor()
60 $entity = $this->getMockBuilder(\
Magento\Eav\Model\Entity\AbstractEntity::class)
61 ->setMethods([
'getConnection',
'getTable',
'getDefaultAttributes',
'getEntityTable'])
62 ->disableOriginalConstructor()
65 ->method(
'getConnection')
67 $entity->expects($this->exactly(2))
69 ->willReturnArgument(0);
71 ->method(
'getDefaultAttributes')
72 ->willReturn([
'attr1',
'attr2']);
74 ->method(
'getEntityTable')
75 ->willReturn(
'table');
77 $universalFactory = $this->getMockBuilder(\
Magento\Framework\
Validator\UniversalFactory::class)
78 ->setMethods([
'create'])
79 ->disableOriginalConstructor()
81 $universalFactory->expects($this->once())
85 return $universalFactory;