/**
  * @dataProvider testIsStoreInUrlDataProvider
  */
 public function testIsStoreInUrl($isUseStoreInUrl)
 {
     $storeMock = $this->getMock('Magento\\Store\\Model\\Store', array(), array(), '', false);
     $storeMock->expects($this->once())->method('isUseStoreInUrl')->will($this->returnValue($isUseStoreInUrl));
     $this->_storeManagerMock->expects($this->any())->method('getStore')->will($this->returnValue($storeMock));
     $this->assertEquals($this->_block->isStoreInUrl(), $isUseStoreInUrl);
     // check value is cached
     $this->assertEquals($this->_block->isStoreInUrl(), $isUseStoreInUrl);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function getTargetStorePostData(\Magento\Store\Model\Store $store, $data = array())
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getTargetStorePostData');
     if (!$pluginInfo) {
         return parent::getTargetStorePostData($store, $data);
     } else {
         return $this->___callPlugins('getTargetStorePostData', func_get_args(), $pluginInfo);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function offsetGet($offset)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'offsetGet');
     if (!$pluginInfo) {
         return parent::offsetGet($offset);
     } else {
         return $this->___callPlugins('offsetGet', func_get_args(), $pluginInfo);
     }
 }