/** * Gets Json String of Object InvoiceSearchResponse * @return string */ public static function getJson() { return '{"total_count":123,"invoices":' . InvoiceTest::getJson() . '}'; }
/** * @dataProvider mockProvider * @param Invoice $obj */ public function testGet($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(InvoiceTest::getJson())); $result = $obj->get("invoiceId", $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }