Пример #1
0
 /**
  * Run test mapCriteriaList method
  *
  * @return void
  */
 public function testMapCriteriaList()
 {
     $criteriaMock = $this->getMockForAbstractClass('Magento\\Framework\\Api\\CriteriaInterface', [], '', false, true, true, ['getMapperInterfaceName']);
     $mapperInstanceMock = $this->getMockForAbstractClass('Magento\\Framework\\DB\\MapperInterface', [], '', false, true, true, ['map']);
     $criteriaMock->expects($this->any())->method('getMapperInterfaceName')->will($this->returnValue('mapper-name'));
     $this->mapperFactoryMock->expects($this->exactly(4))->method('create')->with('mapper-name', ['select' => $this->selectMock])->will($this->returnValue($mapperInstanceMock));
     $mapperInstanceMock->expects($this->exactly(4))->method('map')->will($this->returnValue($this->selectMock));
     $this->geneticMapper->mapCriteriaList(array_fill(0, 4, $criteriaMock));
 }
 /**
  * @param Logger $logger
  * @param FetchStrategyInterface $fetchStrategy
  * @param ObjectFactory $objectFactory
  * @param StoreManagerInterface $storeManager
  * @param MapperFactory $mapperFactory
  * @param Select $select
  */
 public function __construct(Logger $logger, FetchStrategyInterface $fetchStrategy, ObjectFactory $objectFactory, MapperFactory $mapperFactory, StoreManagerInterface $storeManager, Select $select = null)
 {
     $this->storeManager = $storeManager;
     parent::__construct($logger, $fetchStrategy, $objectFactory, $mapperFactory, $select);
 }