/** * @test */ public function shouldReturnPaymentFactorySetToContainer() { $container = new Container; $container->set('fooFactoryServiceId', $this->getMock('Payum\Core\Storage\StorageInterface')); $registry = new ContainerAwareRegistry(array(), array(), array( 'fooName' => 'fooFactoryServiceId', )); $registry->setContainer($container); $this->assertSame($container->get('fooFactoryServiceId'), $registry->getPaymentFactory('fooName')); }