コード例 #1
0
 public function testGetGroupStore()
 {
     $group = 2;
     $countryStore = 12;
     $this->scopeConfig->expects($this->once())->method('getWebsiteValue')->with("tobai_geo_store_switcher/group_{$group}/store")->willReturn($countryStore);
     $this->assertEquals($countryStore, $this->configGeneral->getGroupStore($group));
 }
コード例 #2
0
 public function testGetFrontendWebsiteOrBackendValueBackendStoreScope()
 {
     $path = 'test-path';
     $this->appStateHelper->expects($this->once())->method('isFrontendArea')->willReturn(false);
     $this->scopeDefiner->expects($this->atLeastOnce())->method('getScope')->willReturn(ScopeInterface::SCOPE_STORE);
     $this->scopeDefiner->expects($this->never())->method('getScopeValue');
     $this->appScopeConfig->expects($this->never())->method('getValue');
     $this->assertEmpty($this->scopeConfig->getFrontendWebsiteOrBackendValue($path));
 }
コード例 #3
0
 /**
  * @param int $group
  * @return string
  */
 public function getGroupStore($group)
 {
     return $this->scopeConfig->getWebsiteValue("tobai_geo_store_switcher/group_{$group}/store");
 }