Omnipay\PayPal\RestGatewayTest::testFullRefund PHP Метод

testFullRefund() публичный Метод

public testFullRefund ( )
    public function testFullRefund()
    {
        $request = $this->gateway->refund(array('transactionReference' => 'abc123'));
        $this->assertInstanceOf('\\Omnipay\\PayPal\\Message\\RestRefundRequest', $request);
        $this->assertSame('abc123', $request->getTransactionReference());
        $endPoint = $request->getEndpoint();
        $this->assertSame('https://api.paypal.com/v1/payments/sale/abc123/refund', $endPoint);
        $data = $request->getData();
        // we're expecting an empty object here
        $json = json_encode($data);
        $this->assertEquals('{}', $json);
    }