@@ -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);
@@ -459,10 +460,13 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
459460 $ params ['context ' ] = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
460461 ->create (\Magento \Framework \Model \Context::class, ['appState ' => $ appStateMock ]);
461462
462- $ configMock-> expects ( $ this -> any ())
463+ $ configMock
463464 ->method ('getValue ' )
464- ->with ($ this ->stringContains (Store::XML_PATH_STORE_IN_URL ))
465- ->willReturn ($ storeInUrl );
465+ ->withConsecutive (
466+ [$ this ->stringContains (StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED )],
467+ [$ this ->stringContains (Store::XML_PATH_STORE_IN_URL )]
468+ )
469+ ->willReturnOnConsecutiveCalls ($ singleStoreModeEnabled , $ storeInUrl );
466470
467471 $ params ['config ' ] = $ configMock ;
468472 $ model = $ objectManager ->create (\Magento \Store \Model \Store::class, $ params );
@@ -477,10 +481,14 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
477481 public function isUseStoreInUrlDataProvider ()
478482 {
479483 return [
480- [true , null , true ],
481- [false , null , false ],
482- [true , true , false ],
483- [true , false , true ]
484+ [true , null , false , true ],
485+ [false , null , false , false ],
486+ [true , true , false , false ],
487+ [true , false , false , true ],
488+ [true , null , true , false ],
489+ [false , null , true , false ],
490+ [true , true , true , false ],
491+ [true , false , true , false ]
484492 ];
485493 }
486494
0 commit comments