File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
functional/lib/Magento/Mtf/App/State
integration/framework/Magento/TestFramework Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 8
8
9
9
use Magento \Framework \App \Filesystem \DirectoryList ;
10
10
use Magento \Framework \Config \ConfigOptionsList ;
11
+ use Magento \Framework \App \DeploymentConfig \Reader ;
12
+ use Magento \Framework \App \DeploymentConfig ;
11
13
12
14
/**
13
15
* Abstract class AbstractState
@@ -42,9 +44,10 @@ public function clearInstance()
42
44
$ dirList = \Magento \Mtf \ObjectManagerFactory::getObjectManager ()
43
45
->get ('Magento\Framework\Filesystem\DirectoryList ' );
44
46
45
- $ reader = new \Magento \Framework \App \DeploymentConfig \Reader ($ dirList );
46
- $ deploymentConfig = new \Magento \Framework \App \DeploymentConfig ($ reader );
47
- $ dbInfo = $ deploymentConfig ->getConfigData (ConfigOptionsList::CONFIG_PATH_DB_CONNECTION_DEFAULT );
47
+ $ reader = new Reader ($ dirList );
48
+ $ deploymentConfig = new DeploymentConfig ($ reader );
49
+ $ dbConfig = $ deploymentConfig ->getConfigData (ConfigOptionsList::KEY_DB );
50
+ $ dbInfo = $ dbConfig ['connection ' ]['default ' ];
48
51
$ host = $ dbInfo ['host ' ];
49
52
$ user = $ dbInfo ['username ' ];
50
53
$ password = $ dbInfo ['password ' ];
Original file line number Diff line number Diff line change 11
11
use Magento \Framework \App \Filesystem \DirectoryList ;
12
12
use Magento \Framework \App \DeploymentConfig ;
13
13
use Magento \Framework \Config \ConfigOptionsList ;
14
+ use Magento \Framework \App \DeploymentConfig \Reader ;
14
15
15
16
/**
16
17
* Encapsulates application installation, initialization and uninstall
@@ -161,9 +162,10 @@ public function getDbInstance()
161
162
{
162
163
if (null === $ this ->_db ) {
163
164
if ($ this ->isInstalled ()) {
164
- $ reader = new \ Magento \ Framework \ App \ DeploymentConfig \ Reader ($ this ->dirList );
165
+ $ reader = new Reader ($ this ->dirList );
165
166
$ deploymentConfig = new DeploymentConfig ($ reader , []);
166
- $ dbInfo = $ deploymentConfig ->getConfigData (ConfigOptionsList::CONFIG_PATH_DB_CONNECTION_DEFAULT );
167
+ $ dbConfig = $ deploymentConfig ->getConfigData (ConfigOptionsList::KEY_DB );
168
+ $ dbInfo = $ dbConfig ['connection ' ]['default ' ];
167
169
$ host = $ dbInfo ['host ' ];
168
170
$ user = $ dbInfo ['username ' ];
169
171
$ password = $ dbInfo ['password ' ];
You can’t perform that action at this time.
0 commit comments