public function remind($notification, $apiContext = null, $restCall = null) { ArgumentValidator::validate($this->getId(), "Id"); ArgumentValidator::validate($notification, 'notification'); $payLoad = $notification->toJSON(); self::executeCall("/v1/invoicing/invoices/{$this->getId()}/remind", "POST", $payLoad, null, $apiContext, $restCall); return true; }
/** * @dataProvider mockProvider * @param Invoice $obj */ public function testRemind($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(true)); $notification = NotificationTest::getObject(); $result = $obj->remind($notification, $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }