/** * @test */ public function shouldCallStaticRegistryOnGetGatewayFactories() { $staticRegistryMock = $this->createRegistryMock(); $staticRegistryMock->expects($this->once())->method('getGatewayFactories')->willReturn('theGatewaysFactories'); $registry = new DynamicRegistry($this->createStorageMock(), $staticRegistryMock); $this->assertEquals('theGatewaysFactories', $registry->getGatewayFactories()); }
/** * @test */ public function shouldReturnEmptyArrayOnGetGatewayFactories() { $registry = new DynamicRegistry($this->createStorageMock(), $this->createGatewayFactoryRegistryMock()); $registry->setBackwardCompatibility(false); $this->assertEquals([], $registry->getGatewayFactories()); }