Skip to content

Commit

Permalink
Merge branch '5.4' into 6.3
Browse files Browse the repository at this point in the history
* 5.4:
  fix tests with Doctrine DBAL 3.8
  • Loading branch information
xabbuh committed Oct 17, 2023
2 parents be37ead + bc81693 commit 6479c0b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/Middleware/Debug/MiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Doctrine\DBAL\Driver\Middleware as MiddlewareInterface;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
use Doctrine\DBAL\Statement;
Expand Down Expand Up @@ -208,11 +209,11 @@ public function testTransaction(callable $endTransactionMethod, string $expected
$this->assertCount(9, $debug);
$this->assertSame('"START TRANSACTION"', $debug[1]['sql']);
$this->assertGreaterThan(0, $debug[1]['executionMS']);
$this->assertSame('SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']);
$this->assertSame(method_exists(QueryBuilder::class, 'resetOrderBy') ? 'SAVEPOINT DOCTRINE_2' : 'SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[2]['sql']);
$this->assertGreaterThan(0, $debug[2]['executionMS']);
$this->assertSame('INSERT INTO products(name, price, stock) VALUES ("product1", 12.5, 5)', $debug[3]['sql']);
$this->assertGreaterThan(0, $debug[3]['executionMS']);
$this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' SAVEPOINT DOCTRINE2_SAVEPOINT_2', $debug[4]['sql']);
$this->assertSame(('"ROLLBACK"' === $expectedEndTransactionDebug ? 'ROLLBACK TO' : 'RELEASE').' '.(method_exists(QueryBuilder::class, 'resetOrderBy') ? 'SAVEPOINT DOCTRINE_2' : 'SAVEPOINT DOCTRINE2_SAVEPOINT_2'), $debug[4]['sql']);
$this->assertGreaterThan(0, $debug[4]['executionMS']);
$this->assertSame($expectedEndTransactionDebug, $debug[5]['sql']);
$this->assertGreaterThan(0, $debug[5]['executionMS']);
Expand Down

0 comments on commit 6479c0b

Please sign in to comment.