|
16 | 16 | use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface; |
17 | 17 | use Doctrine\DBAL\DriverManager; |
18 | 18 | use Doctrine\DBAL\ParameterType; |
| 19 | +use Doctrine\DBAL\Query\QueryBuilder; |
19 | 20 | use Doctrine\DBAL\Result; |
20 | 21 | use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory; |
21 | 22 | use Doctrine\DBAL\Types\Types; |
@@ -213,11 +214,11 @@ public function testTransaction(callable $endTransactionMethod, string $expected |
213 | 214 | $this->assertCount(9, $debug); |
214 | 215 | $this->assertSame('"START TRANSACTION"', $debug[1]['sql']); |
215 | 216 | $this->assertGreaterThan(0, $debug[1]['executionMS']); |
216 | | - $this->assertSame('SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']); |
| 217 | + $this->assertSame(method_exists(QueryBuilder::class, 'resetOrderBy') ? 'SAVEPOINT DOCTRINE_2' : 'SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']); |
217 | 218 | $this->assertGreaterThan(0, $debug[2]['executionMS']); |
218 | 219 | $this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product1", 12.5, 5)', $debug[3]['sql']); |
219 | 220 | $this->assertGreaterThan(0, $debug[3]['executionMS']); |
220 | | - $this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[4]['sql']); |
| 221 | + $this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' '.(method_exists(QueryBuilder::class, 'resetOrderBy') ? 'SAVEPOINT DOCTRINE_2' : 'SAVEPOINT DOCTRINE2_SAVEPOINT_2'), $debug[4]['sql']); |
221 | 222 | $this->assertGreaterThan(0, $debug[4]['executionMS']); |
222 | 223 | $this->assertSame($expectedEndTransactionDebug, $debug[5]['sql']); |
223 | 224 | $this->assertGreaterThan(0, $debug[5]['executionMS']); |
|
0 commit comments