public function testExecuteAndExecuteList() { $except = ['test']; $this->productFlatIndexerRows->expects($this->any())->method('execute')->with($this->equalTo($except)); $this->model->execute($except); $this->model->executeList($except); }
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]); }
public function testExecuteList() { $ids = [1, 2, 3]; $this->productFlatIndexerRows->expects($this->any())->method('execute')->with($this->equalTo($ids)); $this->model->executeList($ids); }
/** * Execute partial indexation by ID list * * @param int[] $ids * @return void */ public function executeList(array $ids) { $this->_productFlatIndexerRows->execute($ids); }
/** * @expectedException \Magento\Framework\Model\Exception * @expectedExceptionMessage Bad value was supplied. */ public function testEmptyIds() { $this->_model->execute(null); }