/** * Should delete the product with the given SKU. */ public function testDeleteBySku() { $sku = $this->generator()->anyString(); $this->productResource->shouldReceive('where->limit->first->delete')->atLeast()->once()->andReturn(true); $deleted = $this->productRepository->deleteBySku($sku); $this->assertTrue($deleted); }
/** * @param string $sku * * @throws \Exception * * @return bool */ public function deleteProductBySku(string $sku) { return $this->productRepository->deleteBySku($sku); }