public function delete($apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); $payLoad = ""; self::executeCall("/v1/notifications/webhooks/{$this->getId()}", "DELETE", $payLoad, null, $apiContext, $restCall); return true; }
/** * @dataProvider mockProvider * @param Webhook $obj */ public function testDelete($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(true)); $result = $obj->delete($mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }