public function testDelete() { $productSku = 'sku1'; $productOptions = [$this->productOption1]; $productOption1Sku = 'productOption1Sku'; $this->productData->expects($this->once())->method('getTypeId')->will($this->returnValue(ProductType::TYPE_BUNDLE)); $this->productData->expects($this->once())->method('getSku')->will($this->returnValue($productSku)); $this->productData->expects($this->once())->method('getCustomAttribute')->with('bundle_product_options')->will($this->returnValue($this->attributeValue)); $this->attributeValue->expects($this->any())->method('getValue')->will($this->returnValue($productOptions)); $this->optionWriteService->expects($this->once())->method('remove')->with($productSku, $productOption1Sku)->will($this->returnValue(1)); $this->saveProcessor->delete($this->productData); }