18 $this->model = new \Magento\Catalog\Model\ResourceModel\Indexer\ActiveTableSwitcher();
23 $connectionMock = $this->getMockBuilder(\
Magento\Framework\DB\Adapter\AdapterInterface::class)
24 ->disableOriginalConstructor()
28 $connectionMock->expects($this->once())->method(
'renameTablesBatch')->with(
31 'oldName' =>
'tableName',
32 'newName' =>
'tableName_outdated' 35 'oldName' =>
'tableName_replica',
36 'newName' =>
'tableName' 39 'oldName' =>
'tableName_outdated',
40 'newName' =>
'tableName_replica' 45 $this->model->switchTable($connectionMock, [
$tableName]);
53 $this->model->getAdditionalTableName(
$tableName)
testGetAdditionalTableName()