@@ -446,10 +446,11 @@ public function saveValidationDataProvider()
446446 /**
447447 * @param $storeInUrl
448448 * @param $disableStoreInUrl
449+ * @param $singleStoreModeEnabled
449450 * @param $expectedResult
450451 * @dataProvider isUseStoreInUrlDataProvider
451452 */
452- public function testIsUseStoreInUrl ($ storeInUrl , $ disableStoreInUrl , $ expectedResult )
453+ public function testIsUseStoreInUrl ($ storeInUrl , $ disableStoreInUrl , $ singleStoreModeEnabled , $ expectedResult )
453454 {
454455 $ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
455456 $ configMock = $ this ->createMock (\Magento \Framework \App \Config \ReinitableConfigInterface::class);
@@ -464,6 +465,11 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
464465 ->with ($ this ->stringContains (Store::XML_PATH_STORE_IN_URL ))
465466 ->willReturn ($ storeInUrl );
466467
468+ $ configMock ->expects ($ this ->any ())
469+ ->method ('getValue ' )
470+ ->with ($ this ->stringContains (StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED ))
471+ ->willReturn ($ singleStoreModeEnabled );
472+
467473 $ params ['config ' ] = $ configMock ;
468474 $ model = $ objectManager ->create (\Magento \Store \Model \Store::class, $ params );
469475 $ model ->setDisableStoreInUrl ($ disableStoreInUrl );
@@ -477,10 +483,14 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
477483 public function isUseStoreInUrlDataProvider ()
478484 {
479485 return [
480- [true , null , true ],
481- [false , null , false ],
482- [true , true , false ],
483- [true , false , true ]
486+ [true , null , false , true ],
487+ [false , null , false , false ],
488+ [true , true , false , false ],
489+ [true , false , false , true ],
490+ [true , null , true , false ],
491+ [false , null , true , false ],
492+ [true , true , true , false ],
493+ [true , false , true , false ]
484494 ];
485495 }
486496
0 commit comments