/** * @test */ public function shouldAllowGetName() { $factory = new PayexPaymentFactory; $this->assertEquals('payex', $factory->getName()); }
/** * @test * * @dataProvider provideTaggedActions */ public function shouldAddPayumActionTagToActions($actionId) { $factory = new PayexPaymentFactory(); $container = new ContainerBuilder(); $factory->create($container, 'aContextName', array('obtain_credit_card' => false, 'encryption_key' => 'aKey', 'account_number' => 'aNum', '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']); }