Payum\Paypal\ExpressCheckout\Nvp\Tests\Action\Api\DoVoidActionTest::shouldCallApiDoVoidMethodWithExpectedRequiredArguments PHP Method

shouldCallApiDoVoidMethodWithExpectedRequiredArguments() public method

    public function shouldCallApiDoVoidMethodWithExpectedRequiredArguments()
    {
        $testCase = $this;
        $apiMock = $this->createApiMock();
        $apiMock->expects($this->once())->method('DoVoid')->will($this->returnCallback(function (array $fields) use($testCase) {
            $testCase->assertArrayHasKey('AUTHORIZATIONID', $fields);
            $testCase->assertEquals('theOriginalTransactionId', $fields['AUTHORIZATIONID']);
            return array();
        }));
        $action = new DoVoidAction();
        $action->setApi($apiMock);
        $request = new DoVoid(array('AUTHORIZATIONID' => 'theOriginalTransactionId'));
        $action->execute($request);
    }