Exemplo n.º 1
0
 public function testExecuteAndExecuteList()
 {
     $except = ['test'];
     $this->productFlatIndexerRows->expects($this->any())->method('execute')->with($this->equalTo($except));
     $this->model->execute($except);
     $this->model->executeList($except);
 }
Exemplo n.º 2
0
 public function testExecuteWithExistingFlatTablesCreatesTables()
 {
     $this->_productIndexerHelper->expects($this->any())->method('getFlatTableName')->will($this->returnValue('store_flat_table'));
     $this->_connection->expects($this->any())->method('isTableExists')->with('store_flat_table')->will($this->returnValue(true));
     $this->_flatItemEraser->expects($this->once())->method('removeDeletedProducts');
     $this->_flatTableBuilder->expects($this->once())->method('build')->with('store_id_1', [1, 2]);
     $this->_model->execute([1, 2]);
 }
Exemplo n.º 3
0
 public function testExecuteList()
 {
     $ids = [1, 2, 3];
     $this->productFlatIndexerRows->expects($this->any())->method('execute')->with($this->equalTo($ids));
     $this->model->executeList($ids);
 }
Exemplo n.º 4
0
 /**
  * Execute partial indexation by ID list
  *
  * @param int[] $ids
  * @return void
  */
 public function executeList(array $ids)
 {
     $this->_productFlatIndexerRows->execute($ids);
 }
Exemplo n.º 5
0
 /**
  * @expectedException \Magento\Framework\Model\Exception
  * @expectedExceptionMessage Bad value was supplied.
  */
 public function testEmptyIds()
 {
     $this->_model->execute(null);
 }