19 private $estimatorMock;
24 private $batchRowsCount;
28 $this->estimatorMock = $this->createMock(\
Magento\Framework\Indexer\BatchSizeManagementInterface::class);
29 $this->batchRowsCount = 200;
30 $this->model = new \Magento\Catalog\Model\ResourceModel\Product\Indexer\Price\BatchSizeCalculator(
31 [
'default' => $this->batchRowsCount],
32 [
'default' => $this->estimatorMock],
39 $connectionMock = $this->createMock(\
Magento\Framework\DB\Adapter\AdapterInterface::class);
43 $this->estimatorMock->expects($this->once())
44 ->method(
'ensureBatchSize')
45 ->with($connectionMock, $this->batchRowsCount)
46 ->willReturn($batchSize);
48 $this->model->estimateBatchSize($connectionMock, $typeId);