File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
dev/tests/integration/testsuite/Magento/Store/Model Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -267,12 +267,24 @@ public function testIsCanDelete()
267267 $ this ->assertFalse ($ this ->model ->isCanDelete ());
268268 }
269269
270+ /**
271+ * @magentoDataFixture Magento/Store/_files/second_store.php
272+ */
270273 public function testGetCurrentUrl ()
271274 {
272275 $ this ->model ->load ('admin ' );
273276 $ this ->model ->expects ($ this ->any ())->method ('getUrl ' )->will ($ this ->returnValue ('http://localhost/index.php ' ));
274277 $ this ->assertStringEndsWith ('default ' , $ this ->model ->getCurrentUrl ());
275278 $ this ->assertStringEndsNotWith ('default ' , $ this ->model ->getCurrentUrl (false ));
279+
280+ $ this ->model ->load ('fixture_second_store ' );
281+
282+ \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
283+ ->get (\Magento \Framework \App \Config \MutableScopeConfigInterface::class)
284+ ->setValue (Store::XML_PATH_STORE_IN_URL , true , ScopeInterface::SCOPE_STORE );
285+
286+ $ this ->assertEquals ('http://localhost/index.php?___store=fixture_second_store&___from_store=default ' , $ this ->model ->getCurrentUrl (true ));
287+ $ this ->assertEquals ('http://localhost/index.php?___store=fixture_second_store ' , $ this ->model ->getCurrentUrl (false ));
276288 }
277289
278290 /**
You can’t perform that action at this time.
0 commit comments