Payum\Paypal\ExpressCheckout\Nvp\Tests\Action\CaptureActionTest::shouldNotAddNotifyUrlIfAlreadySet PHP Method

shouldNotAddNotifyUrlIfAlreadySet() public method

    public function shouldNotAddNotifyUrlIfAlreadySet()
    {
        $details = new \ArrayObject(array('PAYMENTREQUEST_0_NOTIFYURL' => 'alreadySetUrl'));
        $captureToken = new Token();
        $captureToken->setGatewayName('theGatewayName');
        $captureToken->setDetails($details);
        $tokenFactoryMock = $this->getMock(GenericTokenFactoryInterface::class);
        $tokenFactoryMock->expects($this->never())->method('createNotifyToken');
        $action = new CaptureAction();
        $action->setGateway($this->createGatewayMock());
        $action->setGenericTokenFactory($tokenFactoryMock);
        $request = new Capture($captureToken);
        $request->setModel($details);
        $action->execute($request);
        $this->assertArrayHasKey('PAYMENTREQUEST_0_NOTIFYURL', $details);
        $this->assertEquals('alreadySetUrl', $details['PAYMENTREQUEST_0_NOTIFYURL']);
    }