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

shouldNotAddNotifyUrlIfPaypalTokenAlreadySet() public method

    public function shouldNotAddNotifyUrlIfPaypalTokenAlreadySet()
    {
        $details = new \ArrayObject(array('TOKEN' => 'foo'));
        $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->assertArrayNotHasKey('PAYMENTREQUEST_0_NOTIFYURL', $details);
    }