예제 #1
0
 /**
  * @test
  * 
  * @expectedException \Payum\Core\Exception\InvalidArgumentException
  * @expectedExceptionMessage Gateway factory "theName" does not exist.
  */
 public function alwaysThrowOnGetGatewayFactory()
 {
     $registry = new DynamicRegistry($this->createStorageMock(), $this->createGatewayFactoryRegistryMock());
     $registry->setBackwardCompatibility(false);
     $registry->getGatewayFactory('theName');
 }
예제 #2
0
 /**
  * @test
  */
 public function shouldCallStaticRegistryOnGetGatewayFactory()
 {
     $staticRegistryMock = $this->createRegistryMock();
     $staticRegistryMock->expects($this->once())->method('getGatewayFactory')->with('theName')->willReturn('theGatewayFactory');
     $registry = new DynamicRegistry($this->createStorageMock(), $staticRegistryMock);
     $this->assertEquals('theGatewayFactory', $registry->getGatewayFactory('theName'));
 }