7
7
8
8
namespace Magento \GraphQl \Store ;
9
9
10
+ use Magento \Framework \App \Config \ScopeConfigInterface ;
10
11
use Magento \Framework \ObjectManagerInterface ;
11
12
use Magento \Store \Api \Data \StoreConfigInterface ;
12
13
use Magento \Store \Api \StoreConfigManagerInterface ;
13
14
use Magento \Store \Model \ResourceModel \Store as StoreResource ;
15
+ use Magento \Store \Model \ScopeInterface ;
14
16
use Magento \Store \Model \Store ;
15
17
use Magento \TestFramework \Helper \Bootstrap ;
16
18
use Magento \TestFramework \TestCase \GraphQlAbstract ;
@@ -175,6 +177,8 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r
175
177
/** @var Store $store */
176
178
$ store = $ this ->objectManager ->get (Store::class);
177
179
$ this ->storeResource ->load ($ store , $ storeConfig ->getCode (), 'code ' );
180
+ /* @var $scopeConfig ScopeConfigInterface */
181
+ $ scopeConfig = $ this ->objectManager ->get (ScopeConfigInterface::class);
178
182
$ this ->assertEquals ($ storeConfig ->getId (), $ responseConfig ['id ' ]);
179
183
$ this ->assertEquals ($ storeConfig ->getCode (), $ responseConfig ['code ' ]);
180
184
$ this ->assertEquals ($ store ->getName (), $ responseConfig ['store_name ' ]);
@@ -200,12 +204,28 @@ private function validateStoreConfig(StoreConfigInterface $storeConfig, array $r
200
204
);
201
205
$ this ->assertEquals ($ storeConfig ->getTimezone (), $ responseConfig ['timezone ' ]);
202
206
$ this ->assertEquals ($ storeConfig ->getWeightUnit (), $ responseConfig ['weight_unit ' ]);
203
- $ this ->assertEquals ($ storeConfig ->getBaseUrl (), $ responseConfig ['base_url ' ]);
204
- $ this ->assertEquals ($ storeConfig ->getBaseLinkUrl (), $ responseConfig ['base_link_url ' ]);
207
+ $ this ->assertEquals ($ storeConfig ->getBaseUrl (), $ responseConfig ['base_url ' ], 'base_url ' );
208
+ $ this ->assertEquals (
209
+ $ scopeConfig ->getValue (
210
+ 'web/unsecure/base_link_url ' ,
211
+ ScopeInterface::SCOPE_STORE ,
212
+ $ storeConfig ->getId ()
213
+ ),
214
+ $ responseConfig ['base_link_url ' ],
215
+ 'base_link_url '
216
+ );
205
217
$ this ->assertEquals ($ storeConfig ->getBaseStaticUrl (), $ responseConfig ['base_static_url ' ]);
206
218
$ this ->assertEquals ($ storeConfig ->getBaseMediaUrl (), $ responseConfig ['base_media_url ' ]);
207
- $ this ->assertEquals ($ storeConfig ->getSecureBaseUrl (), $ responseConfig ['secure_base_url ' ]);
208
- $ this ->assertEquals ($ storeConfig ->getSecureBaseLinkUrl (), $ responseConfig ['secure_base_link_url ' ]);
219
+ $ this ->assertEquals ($ storeConfig ->getSecureBaseUrl (), $ responseConfig ['secure_base_url ' ], 'secure_base_url ' );
220
+ $ this ->assertEquals (
221
+ $ scopeConfig ->getValue (
222
+ 'web/secure/base_link_url ' ,
223
+ ScopeInterface::SCOPE_STORE ,
224
+ $ storeConfig ->getId ()
225
+ ),
226
+ $ responseConfig ['secure_base_link_url ' ],
227
+ 'secure_base_link_url '
228
+ );
209
229
$ this ->assertEquals ($ storeConfig ->getSecureBaseStaticUrl (), $ responseConfig ['secure_base_static_url ' ]);
210
230
$ this ->assertEquals ($ storeConfig ->getSecureBaseMediaUrl (), $ responseConfig ['secure_base_media_url ' ]);
211
231
$ this ->assertEquals ($ store ->isUseStoreInUrl (), $ responseConfig ['use_store_in_url ' ]);
0 commit comments