Esempio n. 1
0
 /**
  * @dataProvider distinctDataProvider
  */
 public function testDistinct($flag, $expectedFlag)
 {
     $adapterMock = $this->getMock('Zend_Db_Adapter_Pdo_Mysql', ['select'], [], '', false);
     $selectMock = $this->getMock('Magento\\Framework\\DB\\Select', ['distinct'], ['adapter' => $adapterMock]);
     $adapterMock->expects($this->once())->method('select')->will($this->returnValue($selectMock));
     $selectMock->expects($this->once())->method('distinct')->with($expectedFlag);
     $this->collection->setConnection($adapterMock);
     $this->collection->distinct($flag);
 }