Exemplo n.º 1
0
 /**
  * @expectedException \RuntimeException
  */
 public function testReplaceIfThrewCustomException()
 {
     $url = $this->getMock('Magento\\UrlRewrite\\Service\\V1\\Data\\UrlRewrite', [], [], '', false);
     $url->expects($this->any())->method('toArray')->will($this->returnValue(['row1']));
     $this->adapter->expects($this->once())->method('insertMultiple')->will($this->throwException(new \RuntimeException()));
     $this->storage->replace([$url]);
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function replace(array $urls)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'replace');
     if (!$pluginInfo) {
         return parent::replace($urls);
     } else {
         return $this->___callPlugins('replace', func_get_args(), $pluginInfo);
     }
 }