/** * @test * * @dataProvider provideTaggedActions */ public function shouldAddPayumActionTagToActions($actionId) { $factory = new PaypalExpressCheckoutNvpPaymentFactory(); $container = new ContainerBuilder(); $factory->create($container, 'aContextName', array('obtain_credit_card' => false, 'username' => 'aUsername', 'password' => 'aPassword', 'signature' => 'aSignature', 'sandbox' => true, 'actions' => array(), 'apis' => array(), 'extensions' => array())); $actionDefinition = $container->getDefinition($actionId); $tagAttributes = $actionDefinition->getTag('payum.action'); $this->assertCount(1, $tagAttributes); $this->assertEquals($factory->getName(), $tagAttributes[0]['factory']); }
/** * @test */ public function shouldAllowGetName() { $factory = new PaypalExpressCheckoutNvpPaymentFactory; $this->assertEquals('paypal_express_checkout_nvp', $factory->getName()); }