/** * @test */ public function shouldAllowGetName() { $factory = new StripeCheckoutPaymentFactory; $this->assertEquals('stripe_checkout', $factory->getName()); }
/** * @test */ public function shouldAddPayumActionTagToApiObtainCheckoutTokenAction() { $factory = new StripeCheckoutPaymentFactory(); $container = new ContainerBuilder(); $factory->create($container, 'aContextName', array('publishable_key' => 'aPubKey', 'secret_key' => 'aSecretKey', 'obtain_credit_card' => false, 'actions' => array(), 'apis' => array(), 'extensions' => array())); $actionDefinition = $container->getDefinition('payum.stripe.action.api.obtain_checkout_token'); $tagAttributes = $actionDefinition->getTag('payum.action'); $this->assertCount(1, $tagAttributes); $this->assertEquals($factory->getName(), $tagAttributes[0]['factory']); }