PayPal\Test\Api\PaymentDetailTest::getObject PHP Method

getObject() public static method

Gets Object Instance with Json data filled in
public static getObject ( ) : PaymentDetail
return PayPal\Api\PaymentDetail
    public static function getObject()
    {
        return new PaymentDetail(self::getJson());
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @dataProvider mockProvider
  * @param Invoice $obj
  */
 public function testRecordPayment($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(true));
     $paymentDetail = PaymentDetailTest::getObject();
     $result = $obj->recordPayment($paymentDetail, $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }