/** * 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)); }