1111
1212namespace Symfony \Component \Messenger \Bridge \Doctrine \Tests \Transport ;
1313
14- use Doctrine \DBAL \Driver ;
1514use Doctrine \DBAL \Platforms \AbstractPlatform ;
1615use Doctrine \DBAL \Platforms \PostgreSQLPlatform ;
1716use Doctrine \DBAL \Schema \AbstractSchemaManager ;
@@ -45,16 +44,10 @@ public function testCreateTransport()
4544 $ driverConnection = $ this ->createMock (\Doctrine \DBAL \Connection::class);
4645 $ schemaManager = $ this ->createMock (AbstractSchemaManager::class);
4746 $ schemaConfig = $ this ->createMock (SchemaConfig::class);
48- $ schemaManager ->method ('createSchemaConfig ' )->willReturn ($ schemaConfig );
49-
5047 $ platform = $ this ->createMock (AbstractPlatform::class);
51- $ driver = $ this ->createMock (Driver::class);
52- $ driver ->expects ($ this ->once ())
53- ->method ('getDatabasePlatform ' )
54- ->willReturn ($ platform );
55-
48+ $ schemaManager ->method ('createSchemaConfig ' )->willReturn ($ schemaConfig );
5649 $ driverConnection ->method ('getSchemaManager ' )->willReturn ($ schemaManager );
57- $ driverConnection ->method ('getDriver ' )->willReturn ($ driver );
50+ $ driverConnection ->method ('getDatabasePlatform ' )->willReturn ($ platform );
5851 $ registry = $ this ->createMock (ConnectionRegistry::class);
5952
6053 $ registry ->expects ($ this ->once ())
@@ -75,16 +68,10 @@ public function testCreateTransportNotifyWithPostgreSQLPlatform()
7568 $ driverConnection = $ this -&
8000
gt;createMock (\Doctrine \DBAL \Connection::class);
7669 $ schemaManager = $ this ->createMock (AbstractSchemaManager::class);
7770 $ schemaConfig = $ this ->createMock (SchemaConfig::class);
78- $ schemaManager ->method ('createSchemaConfig ' )->willReturn ($ schemaConfig );
79-
8071 $ platform = $ this ->createMock (PostgreSQLPlatform::class);
81- $ driver = $ this ->createMock (Driver::class);
82- $ driver ->expects ($ this ->once ())
83- ->method ('getDatabasePlatform ' )
84- ->willReturn ($ platform );
85-
72+ $ schemaManager ->method ('createSchemaConfig ' )->willReturn ($ schemaConfig );
8673 $ driverConnection ->method ('getSchemaManager ' )->willReturn ($ schemaManager );
87- $ driverConnection ->method ('getDriver ' )->willReturn ($ driver );
74+ $ driverConnection ->method ('getDatabasePlatform ' )->willReturn ($ platform );
8875 $ registry = $ this ->createMock (ConnectionRegistry::class);
8976
9077 $ registry ->expects ($ this ->once ())
0 commit comments