11
11
12
12
namespace Symfony \Component \Messenger \Bridge \Doctrine \Tests \Transport ;
13
13
14
- use Doctrine \DBAL \Driver ;
15
14
use Doctrine \DBAL \Platforms \AbstractPlatform ;
16
15
use Doctrine \DBAL \Platforms \PostgreSQLPlatform ;
17
16
use Doctrine \DBAL \Schema \AbstractSchemaManager ;
@@ -45,16 +44,10 @@ public function testCreateTransport()
45
44
$ driverConnection = $ this ->createMock (\Doctrine \DBAL \Connection::class);
46
45
$ schemaManager = $ this ->createMock (AbstractSchemaManager::class);
47
46
$ schemaConfig = $ this ->createMock (SchemaConfig::class);
48
- $ schemaManager ->method ('createSchemaConfig ' )->willReturn ($ schemaConfig );
49
-
50
47
$ 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 );
56
49
$ driverConnection ->method ('getSchemaManager ' )->willReturn ($ schemaManager );
57
- $ driverConnection ->method ('getDriver ' )->willReturn ($ driver );
50
+ $ driverConnection ->method ('getDatabasePlatform ' )->willReturn ($ platform );
58
51
$ registry = $ this ->createMock (ConnectionRegistry::class);
59
52
60
53
$ registry ->expects ($ this ->once ())
@@ -75,16 +68,10 @@ public function testCreateTransportNotifyWithPostgreSQLPlatform()
75
68
$ driverConnection = $ this ->createMock (\Doctrine \DBAL \Connection::class);
76
69
$ schemaManager = $ this ->createMock (AbstractSchemaManager::class);
77
70
$ schemaConfig = $ this ->createMock (SchemaConfig::class);
78
- $ schemaManager ->method ('createSchemaConfig ' )->willReturn ($ schemaConfig );
79
-
80
71
$ 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 );
86
73
$ driverConnection ->method ('getSchemaManager ' )->willReturn ($ schemaManager );
87
- $ driverConnection ->method ('getDriver ' )->willReturn ($ driver );
74
+ $ driverConnection ->method ('getDatabasePlatform ' )->willReturn ($ platform );
88
75
$ registry = $ this ->createMock (ConnectionRegistry::class);
89
76
90
77
$ registry ->expects ($ this ->once ())
0 commit comments