getObject() public static method

Gets Object Instance with Json data filled in
public static getObject ( ) : PaymentExecution
return PayPal\Api\PaymentExecution
Example #1
0
 /**
  * @dataProvider mockProvider
  * @param Payment $obj
  */
 public function testExecute($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(self::getJson()));
     $paymentExecution = PaymentExecutionTest::getObject();
     $result = $obj->execute($paymentExecution, $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }