Payum\Paypal\ProCheckout\Nvp\Tests\ApiTest::shouldUseSandboxApiEndpointIfSandboxTrue PHP Method

shouldUseSandboxApiEndpointIfSandboxTrue() public method

    public function shouldUseSandboxApiEndpointIfSandboxTrue()
    {
        $testCase = $this;
        $clientMock = $this->createHttpClientMock();
        $clientMock->expects($this->once())->method('send')->will($this->returnCallback(function (RequestInterface $request) use($testCase) {
            $testCase->assertEquals('https://pilot-payflowpro.paypal.com/', $request->getUri());
            return new Response(200, [], $request->getBody());
        }));
        $api = new Api(array('username' => 'theUsername', 'password' => 'thePassword', 'partner' => 'thePartner', 'vendor' => 'theVendor', 'tender' => 'theTender', 'sandbox' => true), $clientMock, $this->createHttpMessageFactory());
        $api->doCredit(array());
    }