/**
  * {@inheritdoc}
  */
 public function getCurrentStoreId()
 {
     $store = $this->getDefaultStoreById(parent::getCurrentStoreId());
     $this->generalConfig->setOriginStore($store);
     if ($this->generalConfig->isAvailable() && !$this->isSwitched) {
         $this->switchScope();
         $this->isSwitched = true;
     }
     return parent::getCurrentStoreId();
 }
 public function testSetOriginStore()
 {
     $store = $this->getMock('Magento\\Store\\Api\\Data\\StoreInterface');
     $this->scopeConfig->expects($this->once())->method('setOriginStore')->with($store)->willReturnSelf();
     $this->assertSame($this->configGeneral, $this->configGeneral->setOriginStore($store));
 }