/** * @dataProvider mockProvider * @param Agreement $obj */ public function testTransactions($obj, $mockApiContext) { $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock(); $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(AgreementTransactionsTest::getJson())); $result = $obj->searchTransactions("agreementId", array(), $mockApiContext, $mockPayPalRestCall); $this->assertNotNull($result); }