File tree 1 file changed +12
-0
lines changed
dev/tests/integration/testsuite/Magento/Store/Model
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -267,12 +267,24 @@ public function testIsCanDelete()
267
267
$ this ->assertFalse ($ this ->model ->isCanDelete ());
268
268
}
269
269
270
+ /**
271
+ * @magentoDataFixture Magento/Store/_files/second_store.php
272
+ */
270
273
public function testGetCurrentUrl ()
271
274
{
272
275
$ this ->model ->load ('admin ' );
273
276
$ this ->model ->expects ($ this ->any ())->method ('getUrl ' )->will ($ this ->returnValue ('http://localhost/index.php ' ));
274
277
$ this ->assertStringEndsWith ('default ' , $ this ->model ->getCurrentUrl ());
275
278
$ 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 ));
276
288
}
277
289
278
290
/**
You can’t perform that action at this time.
0 commit comments