File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
dev/tests/integration/framework/Magento/TestFramework/Annotation Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -32,21 +32,28 @@ class IndexerDimensionMode
32
32
public function __construct (Application $ application )
33
33
{
34
34
$ this ->db = $ application ->getDbInstance ();
35
- $ this ->objectManager = Bootstrap::getObjectManager ();
36
- $ this ->modeSwithcer = $ this ->objectManager ->get (ModeSwitcher::class);
37
- $ this ->configWriter = $ this ->objectManager ->get (ConfigInterface::class);
38
35
}
39
36
40
37
private function restoreDb ()
41
38
{
42
39
$ this ->db ->restoreFromDbDump ();
43
40
}
44
41
42
+ private function initSwicher ()
43
+ {
44
+ if (!$ this ->modeSwithcer ) {
45
+ $ this ->objectManager = Bootstrap::getObjectManager ();
46
+ $ this ->modeSwithcer = $ this ->objectManager ->get (ModeSwitcher::class);
47
+ $ this ->configWriter = $ this ->objectManager ->get (ConfigInterface::class);
48
+ }
49
+ }
50
+
45
51
/**
46
52
* @param string $mode
47
53
*/
48
54
private function setDimensionMode ($ mode = DimensionModeConfiguration::DIMENSION_WEBSITE_AND_CUSTOMER_GROUP )
49
55
{
56
+ $ this ->initSwicher ();
50
57
$ this ->modeSwithcer ->createTables ($ mode );
51
58
$ this ->modeSwithcer ->moveData ($ mode , DimensionModeConfiguration::DIMENSION_NONE );
52
59
$ this ->configWriter ->saveConfig (ModeSwitcher::XML_PATH_PRICE_DIMENSIONS_MODE , $ mode );
You can’t perform that action at this time.
0 commit comments