/** * @dataProvider mockProvider * @param Invoice $obj */ public function testSearch($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(InvoiceSearchResponseTest::getJson())); $search = SearchTest::getObject(); $result = $obj->search($search, $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }