1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2015 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
namespace Magento \TestFramework \Store ;
7
7
8
+ use Magento \Framework \Interception \InterceptorInterface ;
8
9
use Magento \TestFramework \App \Config ;
9
10
use Magento \TestFramework \ObjectManager ;
10
11
11
12
/**
12
13
* Integration tests decoration of store manager
13
- *
14
- * @package Magento\TestFramework\Store
15
14
*/
16
15
class StoreManager implements \Magento \Store \Model \StoreManagerInterface
17
16
{
@@ -43,7 +42,7 @@ public function __construct(
43
42
}
44
43
45
44
/**
46
- * { @inheritdoc}
45
+ * @inheritdoc
47
46
*/
48
47
public function setCurrentStore ($ store )
49
48
{
@@ -52,7 +51,7 @@ public function setCurrentStore($store)
52
51
}
53
52
54
53
/**
55
- * { @inheritdoc}
54
+ * @inheritdoc
56
55
*/
57
56
public function setIsSingleStoreModeAllowed ($ value )
58
57
{
@@ -61,7 +60,7 @@ public function setIsSingleStoreModeAllowed($value)
61
60
}
62
61
63
62
/**
64
- * { @inheritdoc}
63
+ * @inheritdoc
65
64
*/
66
65
public function hasSingleStore ()
67
66
{
@@ -71,7 +70,7 @@ public function hasSingleStore()
71
70
}
72
71
73
72
/**
74
- * { @inheritdoc}
73
+ * @inheritdoc
75
74
*/
76
75
public function isSingleStoreMode ()
77
76
{
@@ -81,7 +80,7 @@ public function isSingleStoreMode()
81
80
}
82
81
83
82
/**
84
- * { @inheritdoc}
83
+ * @inheritdoc
85
84
*/
86
85
public function getStore ($ storeId = null )
87
86
{
@@ -91,7 +90,7 @@ public function getStore($storeId = null)
91
90
}
92
91
93
92
/**
94
- * { @inheritdoc}
93
+ * @inheritdoc
95
94
*/
96
95
public function getStores ($ withDefault = false , $ codeKey = false )
97
96
{
@@ -101,7 +100,7 @@ public function getStores($withDefault = false, $codeKey = false)
101
100
}
102
101
103
102
/**
104
- * { @inheritdoc}
103
+ * @inheritdoc
105
104
*/
106
105
public function getWebsite ($ websiteId = null )
107
106
{
@@ -111,7 +110,7 @@ public function getWebsite($websiteId = null)
111
110
}
112
111
113
112
/**
114
- * { @inheritdoc}
113
+ * @inheritdoc
115
114
*/
116
115
public function getWebsites ($ withDefault = false , $ codeKey = false )
117
116
{
@@ -121,13 +120,16 @@ public function getWebsites($withDefault = false, $codeKey = false)
121
120
}
122
121
123
122
/**
124
- * { @inheritdoc}
123
+ * @inheritdoc
125
124
*/
126
125
public function reinitStores ()
127
126
{
128
127
//In order to restore configFixture values
129
128
$ testAppConfig = ObjectManager::getInstance ()->get (Config::class);
130
129
$ reflection = new \ReflectionClass ($ testAppConfig );
130
+ if ($ reflection ->implementsInterface (InterceptorInterface::class)) {
131
+ $ reflection = $ reflection ->getParentClass ();
132
+ }
131
133
$ dataProperty = $ reflection ->getProperty ('data ' );
132
134
$ dataProperty ->setAccessible (true );
133
135
$ savedConfig = $ dataProperty ->getValue ($ testAppConfig );
@@ -139,7 +141,7 @@ public function reinitStores()
139
141
}
140
142
141
143
/**
142
- * { @inheritdoc}
144
+ * @inheritdoc
143
145
*/
144
146
public function getDefaultStoreView ()
145
147
{
@@ -149,7 +151,7 @@ public function getDefaultStoreView()
149
151
}
150
152
151
153
/**
152
- * { @inheritdoc}
154
+ * @inheritdoc
153
155
*/
154
156
public function getGroup ($ groupId = null )
155
157
{
@@ -159,7 +161,7 @@ public function getGroup($groupId = null)
159
161
}
160
162
161
163
/**
162
- * { @inheritdoc}
164
+ * @inheritdoc
163
165
*/
164
166
public function getGroups ($ withDefault = false )
165
167
{
0 commit comments