29 $this->_objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
30 $this->_connectionMock = $this->createMock(\
Magento\Framework\DB\Adapter\AdapterInterface::class);
31 $this->_resourceMock = $this->createMock(\
Magento\Framework\
App\ResourceConnection::class);
46 $temporaryFlatTableName,
47 $expectedRenameTablesArgument
49 $this->_connectionMock->expects($this->exactly(2))->method(
'dropTable')->with($flatDropName);
50 $this->_connectionMock->expects(
57 $this->returnValue($isFlatTableExists)
60 $this->_connectionMock->expects(
65 $expectedRenameTablesArgument
68 $this->_resourceMock->expects(
73 $this->returnValue($this->_connectionMock)
76 $model = $this->_objectManager->getObject(
78 [
'resource' => $this->_resourceMock]
81 $model->move($flatTable, $flatDropName, $temporaryFlatTableName);
96 [
'oldName' =>
'flat_table',
'newName' =>
'flat_table_to_drop'],
97 [
'oldName' =>
'flat_tmp',
'newName' =>
'flat_table']
103 'flat_table_to_drop',
105 [[
'oldName' =>
'flat_tmp',
'newName' =>
'flat_table']]
testMove( $flatTable, $isFlatTableExists, $flatDropName, $temporaryFlatTableName, $expectedRenameTablesArgument)