@@ -97,6 +97,8 @@ public static function provideDsn()
97
97
}
98
98
99
99
/**
100
+ * @param class-string<AbstractPlatform>
101
+ *
100
102
* @dataProvider providePlatforms
101
103
*/
102
104
public function testCreatesTableInTransaction (string $ platform )
@@ -128,7 +130,7 @@ public function testCreatesTableInTransaction(string $platform)
128
130
->willReturn (true );
129
131
130
132
$ platform = $ this ->createMock ($ platform );
131
- $ platform ->method (method_exists (AbstractPlatform::class, 'getCreateTablesSQL ' ) ? ' getCreateTablesSQL ' : ' getCreateTableSQL ' )
133
+ $ platform ->method ('getCreateTablesSQL ' )
132
134
->willReturn (['create sql stmt ' ]);
133
135
134
136
$ conn ->method ('getDatabasePlatform ' )
@@ -144,10 +146,8 @@ public function testCreatesTableInTransaction(string $platform)
144
146
public static function providePlatforms (): \Generator
145
147
{
146
148
yield [\Doctrine \DBAL \Platforms \PostgreSQLPlatform::class];
147
- yield [\Doctrine \DBAL \Platforms \PostgreSQL94Platform::class];
148
149
yield [\Doctrine \DBAL \Platforms \SqlitePlatform::class];
149
150
yield [\Doctrine \DBAL \Platforms \SQLServerPlatform::class];
150
- yield [\Doctrine \DBAL \Platforms \SQLServer2012Platform::class];
151
151
}
152
152
153
153
public function testTableCreationInTransactionNotSupported ()
@@ -178,7 +178,7 @@ public function testTableCreationInTransactionNotSupported()
178
178
->willReturn (true );
179
179
180
180
$ platform = $ this ->createMock (AbstractPlatform::class);
181
- $ platform ->method (method_exists (AbstractPlatform::class, 'getCreateTablesSQL ' ) ? ' getCreateTablesSQL ' : ' getCreateTableSQL ' )
181
+ $ platform ->method ('getCreateTablesSQL ' )
182
182
->willReturn (['create sql stmt ' ]);
183
183
184
184
$ conn ->expects ($ this ->atLeast (2 ))
@@ -220,7 +220,7 @@ public function testCreatesTableOutsideTransaction()
220
220
->willReturn (false );
221
221
222
222
$ platform = $ this ->createMock (AbstractPlatform::class);
223
- $ platform ->method (method_exists (AbstractPlatform::class, 'getCreateTablesSQL ' ) ? ' getCreateTablesSQL ' : ' getCreateTableSQL ' )
223
+ $ platform ->method ('getCreateTablesSQL ' )
224
224
->willReturn (['create sql stmt ' ]);
225
225
226
226
$ conn ->method ('getDatabasePlatform ' )
0 commit comments