/** * @dataProvider mockProvider * @param Sale $obj */ public function testGet($obj, $mockApiContext) { $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(SaleTest::getJson())); $result = $obj->get("saleId", $mockApiContext, $mockPPRestCall); $this->assertNotNull($result); }
/** * Gets Json String of Object RelatedResources * * @return string */ public static function getJson() { return '{"sale":' . SaleTest::getJson() . ',"authorization":' . AuthorizationTest::getJson() . ',"order":' . OrderTest::getJson() . ',"capture":' . CaptureTest::getJson() . ',"refund":' . RefundTest::getJson() . '}'; }