@@ -446,10 +446,11 @@ public function saveValidationDataProvider()
446
446
/**
447
447
* @param $storeInUrl
448
448
* @param $disableStoreInUrl
449
+ * @param $singleStoreModeEnabled
449
450
* @param $expectedResult
450
451
* @dataProvider isUseStoreInUrlDataProvider
451
452
*/
452
- public function testIsUseStoreInUrl ($ storeInUrl , $ disableStoreInUrl , $ expectedResult )
453
+ public function testIsUseStoreInUrl ($ storeInUrl , $ disableStoreInUrl , $ singleStoreModeEnabled , $ expectedResult )
453
454
{
454
455
$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
455
456
$ configMock = $ this ->createMock (\Magento \Framework \App \Config \ReinitableConfigInterface::class);
@@ -464,6 +465,11 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
464
465
->with ($ this ->stringContains (Store::XML_PATH_STORE_IN_URL ))
465
466
->willReturn ($ storeInUrl );
466
467
468
+ $ configMock ->expects ($ this ->any ())
469
+ ->method ('getValue ' )
470
+ ->with ($ this ->stringContains (StoreManager::XML_PATH_SINGLE_STORE_MODE_ENABLED ))
471
+ ->willReturn ($ singleStoreModeEnabled );
472
+
467
473
$ params ['config ' ] = $ configMock ;
468
474
$ model = $ objectManager ->create (\Magento \Store \Model \Store::class, $ params );
469
475
$ model ->setDisableStoreInUrl ($ disableStoreInUrl );
@@ -477,10 +483,14 @@ public function testIsUseStoreInUrl($storeInUrl, $disableStoreInUrl, $expectedRe
477
483
public function isUseStoreInUrlDataProvider ()
478
484
{
479
485
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 ]
484
494
];
485
495
}
486
496
0 commit comments