/** * Gets Json String of Object PaymentHistory * @return string */ public static function getJson() { return '{"payments":' . PaymentTest::getJson() . ',"count":123,"next_id":"TestSample"}'; }
/** * @dataProvider mockProvider * @param Payment $obj */ public function testGet($obj, $mockApiContext) { $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(PaymentTest::getJson())); $result = $obj->get("paymentId", $mockApiContext, $mockPPRestCall); $this->assertNotNull($result); }