Exemplo n.º 1
0
 /**
  * @param \Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory $urlRewriteFactory
  * @param DataObjectHelper $dataObjectHelper
  * @param \Magento\Framework\App\Resource $resource
  */
 public function __construct(UrlRewriteFactory $urlRewriteFactory, DataObjectHelper $dataObjectHelper, Resource $resource)
 {
     $this->connection = $resource->getConnection(Resource::DEFAULT_WRITE_RESOURCE);
     $this->resource = $resource;
     parent::__construct($urlRewriteFactory, $dataObjectHelper);
 }
 public function testReplace()
 {
     $urls = [['UrlRewrite1'], ['UrlRewrite2']];
     $this->storage->expects($this->once())->method('doReplace')->with($urls);
     $this->storage->replace($urls);
 }
Exemplo n.º 3
0
 /**
  * @param \Magento\UrlRewrite\Service\V1\Data\UrlRewriteFactory $urlRewriteFactory
  * @param DataObjectHelper $dataObjectHelper
  * @param \Magento\Framework\App\ResourceConnection $resource
  */
 public function __construct(UrlRewriteFactory $urlRewriteFactory, DataObjectHelper $dataObjectHelper, ResourceConnection $resource)
 {
     $this->connection = $resource->getConnection();
     $this->resource = $resource;
     parent::__construct($urlRewriteFactory, $dataObjectHelper);
 }