File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
app/code/Magento/Directory/Test/Unit/Helper Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -294,4 +294,26 @@ public function topCountriesDataProvider()
294
294
['US,RU ' , ['US ' , 'RU ' ]],
295
295
];
296
296
}
297
+
298
+ /**
299
+ * @throws \ReflectionException
300
+ */
301
+ public function testGetCurrentScopeWithoutRequestParameters ()
302
+ {
303
+ $ storeId = 1 ;
304
+ $ scope = [
305
+ 'type ' => ScopeInterface::SCOPE_STORE ,
306
+ 'value ' => $ storeId ,
307
+ ];
308
+
309
+ $ this ->_store ->expects ($ this ->atLeastOnce ())->method ('getId ' )->willReturn ($ storeId );
310
+
311
+ $ reflector = new \ReflectionClass ($ this ->_object );
312
+ $ method = $ reflector ->getMethod ('getCurrentScope ' );
313
+ $ method ->setAccessible (true );
314
+
315
+ $ result = $ method ->invoke ($ this ->_object );
316
+ $ this ->assertIsArray ($ result );
317
+ $ this ->assertEquals ($ scope , $ result );
318
+ }
297
319
}
You can’t perform that action at this time.
0 commit comments