|
15 | 15 | use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface; |
16 | 16 | use Doctrine\DBAL\DriverManager; |
17 | 17 | use Doctrine\DBAL\ParameterType; |
| 18 | +use Doctrine\DBAL\Query\QueryBuilder; |
18 | 19 | use Doctrine\DBAL\Result; |
19 | 20 | use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; |
20 | 21 | use Doctrine\DBAL\Statement; |
@@ -204,11 +205,11 @@ public function testTransaction(callable $endTransactionMethod, string $expected |
204 | 205 | $this->assertCount(9, $debug); |
205 | 206 | $this->assertSame('"START TRANSACTION"', $debug[1]['sql']); |
206 | 207 | $this->assertGreaterThan(0, $debug[1]['executionMS']); |
207 | | - $this->assertSame('SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']); |
| 208 | + $this->assertSame(method_exists(QueryBuilder::class, 'resetOrderBy') ? 'SAVEPOINT DOCTRINE_2' : 'SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']); |
208 | 209 | $this->assertGreaterThan(0, $debug[2]['executionMS']); |
209 | 210 | $this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product1", 12.5, 5)', $debug[3]['sql']); |
210 | 211 | $this->assertGreaterThan(0, $debug[3]['executionMS']); |
211 | | - $this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[4]['sql']); |
| 212 | + $this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' '.(method_exists(QueryBuilder::class, 'resetOrderBy') ? 'SAVEPOINT DOCTRINE_2' : 'SAVEPOINT DOCTRINE2_SAVEPOINT_2'), $debug[4]['sql']); |
212 | 213 | $this->assertGreaterThan(0, $debug[4]['executionMS']); |
213 | 214 | $this->assertSame($expectedEndTransactionDebug, $debug[5]['sql']); |
214 | 215 | $this->assertGreaterThan(0, $debug[5]['executionMS']); |
|
0 commit comments