Omnipay\PayPal\RestGatewayTest::testCapture PHP Method

testCapture() public method

public testCapture ( )
    public function testCapture()
    {
        $request = $this->gateway->capture(array('transactionReference' => 'abc123', 'amount' => 10.0, 'currency' => 'AUD'));
        $this->assertInstanceOf('\\Omnipay\\PayPal\\Message\\RestCaptureRequest', $request);
        $this->assertSame('abc123', $request->getTransactionReference());
        $endPoint = $request->getEndpoint();
        $this->assertSame('https://api.paypal.com/v1/payments/authorization/abc123/capture', $endPoint);
        $data = $request->getData();
        $this->assertNotEmpty($data);
    }