| 1 | <?php |
||
| 13 | |||
| 14 | class DoctrineDBALTransportFactoryFactoryTest extends TestCase |
||
| 15 | { |
||
| 16 | use ProphecyTrait; |
||
| 17 | |||
| 18 | public function testFactory(): void |
||
| 19 | { |
||
| 20 | $container = $this->prophesize(ContainerInterface::class); |
||
| 21 | $factory = new DoctrineDBALTransportFactoryFactory(); |
||
| 22 | $service = $factory($container->reveal()); |
||
| 23 | |||
| 24 | $this->assertInstanceOf(DoctrineDBALTransportFactory::class, $service); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function testFactoryWithoutContainer(): void |
||
| 28 | { |
||
| 29 | $this->expectException(TypeError::class); |
||
| 30 | |||
| 31 | $factory = new DoctrineDBALTransportFactoryFactory(); |
||
| 32 | $factory(null); |
||
| 35 |