|
| __construct ($host, $user, $password, $schema, $varPath, \Magento\Framework\Shell $shell) |
|
| cleanup () |
|
| isDbDumpExists () |
|
| storeDbDump () |
|
| restoreFromDbDump () |
|
| getVendorName () |
|
| __construct ($host, $user, $password, $schema, $varPath, \Magento\Framework\Shell $shell) |
|
| cleanup () |
|
| isDbDumpExists () |
|
| storeDbDump () |
|
| restoreFromDbDump () |
|
| getVendorName () |
|
| getSchema () |
|
| getHost () |
|
| getUser () |
|
| getPassword () |
|
Definition at line 12 of file Mysql.php.
◆ __construct()
{}
Definition at line 48 of file Mysql.php.
52 if (strpos($this->_host,
':') !==
false) {
53 list($host, $port) = explode(
':', $this->_host);
55 $this->_port = (int) $port;
57 $this->_dbDumpFile = $this->_varPath .
'/setup_dump_' . $this->_schema .
'.sql';
const DEFAULTS_EXTRA_FILE_NAME
if(!file_exists($installConfigFile)) if(!defined('TESTS_INSTALLATION_DB_CONFIG_FILE')) $shell
◆ cleanup()
Remove all DB objects
Definition at line 64 of file Mysql.php.
66 $this->ensureDefaultsExtraFile();
67 $this->_shell->execute(
68 'mysql --defaults-file=%s --host=%s --port=%s %s -e %s',
70 $this->_defaultsExtraFile,
74 "DROP DATABASE `{$this->_schema}`; CREATE DATABASE `{$this->_schema}`"
◆ getSetupDbDumpFilename()
getSetupDbDumpFilename |
( |
| ) |
|
|
protected |
Get filename for setup db dump
- Returns
- string
Definition at line 84 of file Mysql.php.
86 return $this->_dbDumpFile;
◆ getVendorName()
◆ isDbDumpExists()
Is dump exists
- Returns
- bool
Definition at line 94 of file Mysql.php.
◆ restoreFromDbDump()
{}
- Exceptions
-
Definition at line 115 of file Mysql.php.
117 $this->ensureDefaultsExtraFile();
121 $this->_shell->execute(
122 'mysql --defaults-file=%s --host=%s --port=%s %s < %s',
◆ storeDbDump()
Store setup db dump
Definition at line 102 of file Mysql.php.
104 $this->ensureDefaultsExtraFile();
105 $this->_shell->execute(
106 'mysqldump --defaults-file=%s --host=%s --port=%s %s > %s',
◆ DEFAULT_PORT
const DEFAULT_PORT = 3306 |
◆ DEFAULTS_EXTRA_FILE_NAME
const DEFAULTS_EXTRA_FILE_NAME = 'defaults_extra.cnf' |
Defaults extra file name
Definition at line 22 of file Mysql.php.
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php