public static function getJson()
{
return '{"id":"TestSample","amount":' . AmountTest::getJson() . ',"state":"TestSample","reason":"TestSample","invoice_number":"TestSample","sale_id":"TestSample","capture_id":"TestSample","parent_payment":"TestSample","description":"TestSample","create_time":"TestSample","update_time":"TestSample","reason_code":"TestSample","links":' . LinksTest::getJson() . '}';
}
/** * @dataProvider mockProvider * @param Refund $obj */ public function testGet($obj, $mockApiContext) { $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(RefundTest::getJson())); $result = $obj->get("refundId", $mockApiContext, $mockPPRestCall); $this->assertNotNull($result); }