Skip to content

Commit

Permalink
#21151: Fixed static tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sivaschenko committed Feb 28, 2019
1 parent 07e3cf5 commit b11652b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/code/Magento/Backup/Model/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ class Db implements \Magento\Framework\Backup\Db\BackupDbInterface
private $getViewsBackup;

/**
* @param \Magento\Backup\Model\ResourceModel\Db $resourceDb
* Db constructor.
* @param ResourceModel\Db $resourceDb
* @param \Magento\Framework\App\ResourceConnection $resource
* @param Helper|null $helper
* @param GetListTables|null $getListTables
* @param GetViewsBackup|null $getViewsBackup
* @param Helper|null $helper
*/
public function __construct(
\Magento\Backup\Model\ResourceModel\Db $resourceDb,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ public function __construct(ResourceConnection $resource)
}

/**
* Get base tables
*
* @return array
*/
public function execute()
{
return $this->resource->getConnection('backup')->fetchCol(
"SHOW FULL TABLES WHERE `Table_type` = ?",
"SHOW FULL TABLES WHERE `Table_type` = ?",
self::TABLE_TYPE
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public function __construct(ResourceConnection $resource)
}

/**
* Get view tables
*
* @return array
*/
public function execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public function __construct(
}

/**
* Backup
*
* @param BackupInterface $backup
*/
public function execute(BackupInterface $backup)
Expand All @@ -58,6 +60,8 @@ public function execute(BackupInterface $backup)
}

/**
* Get connection
*
* @return AdapterInterface
*/
private function getConnection()
Expand All @@ -70,6 +74,8 @@ private function getConnection()
}

/**
* Get show create view
*
* @param string $viewName
* @return string
*/
Expand All @@ -85,6 +91,8 @@ private function getShowCreateView($viewName)
}

/**
* Get view header
*
* @param string $viewName
* @return string
*/
Expand All @@ -95,6 +103,8 @@ public function getViewHeader($viewName)
}

/**
* Get drop view SQL
*
* @param string $viewName
* @return string
*/
Expand Down

0 comments on commit b11652b

Please sign in to comment.