Beispiel #1
0
 /**
  * Save data for product relations
  *
  * @param   \Magento\Catalog\Model\Product $product
  * @return  $this
  */
 public function saveProductRelations($product)
 {
     $this->saveProductLinks->execute(\Magento\Catalog\Api\Data\ProductInterface::class, $product);
     return $this;
 }
Beispiel #2
0
 public function testSaveProductRelations()
 {
     $product = $this->getMockBuilder('Magento\\Catalog\\Model\\Product')->disableOriginalConstructor()->getMock();
     $this->saveProductLinksMock->expects($this->once())->method('execute')->with(\Magento\Catalog\Api\Data\ProductInterface::class, $product);
     $this->model->saveProductRelations($product);
 }