/**
  * @test
  */
 public function shouldReturnGatewayFactorySetToContainer()
 {
     $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->getGatewayFactory('fooName'));
 }
 /**
  * @test
  */
 public function shouldReturnStorageSetToContainer()
 {
     $payments = array();
     $storages = array('stdClass' => 'fooStorageServiceId');
     $paymentName = 'fooName';
     $storageName = 'barName';
     $container = new Container();
     $container->set('fooStorageServiceId', $this->getMock('Payum\\Core\\Storage\\StorageInterface'));
     $registry = new ContainerAwareRegistry($payments, $storages, $paymentName, $storageName);
     $registry->setContainer($container);
     $this->assertSame($container->get('fooStorageServiceId'), $registry->getStorage('stdClass'));
 }