Omnipay\PayPal\Message\ExpressInContextAuthorizeResponseTest::testExpressPurchaseSuccess PHP Method

testExpressPurchaseSuccess() public method

    public function testExpressPurchaseSuccess()
    {
        $httpResponse = $this->getMockHttpResponse('ExpressPurchaseSuccess.txt');
        $request = $this->getMockRequest();
        $request->shouldReceive('getTestMode')->once()->andReturn(true);
        $response = new ExpressInContextAuthorizeResponse($request, $httpResponse->getBody());
        $this->assertFalse($response->isPending());
        $this->assertFalse($response->isSuccessful());
        $this->assertSame('EC-42721413K79637829', $response->getTransactionReference());
        $this->assertNull($response->getMessage());
        $this->assertNull($response->getRedirectData());
        $this->assertSame('https://www.sandbox.paypal.com/checkoutnow?useraction=commit&token=EC-42721413K79637829', $response->getRedirectUrl());
        $this->assertSame('GET', $response->getRedirectMethod());
    }