diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH10880Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH10880Test.php index f68abc34b94..37f8f3a9c3a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH10880Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH10880Test.php @@ -40,9 +40,22 @@ public function testProcessShouldBeUpdated(): void $queryLog->reset()->enable(); $this->_em->flush(); + $this->removeTransactionCommandsFromQueryLog(); + self::assertCount(1, $queryLog->queries); self::assertSame('UPDATE GH10880BaseProcess SET description = ? WHERE id = ?', $queryLog->queries[0]['sql']); } + + private function removeTransactionCommandsFromQueryLog(): void + { + $log = $this->getQueryLog(); + + foreach ($log->queries as $key => $entry) { + if ($entry['sql'] === '"START TRANSACTION"' || $entry['sql'] === '"COMMIT"') { + unset($log->queries[$key]); + } + } + } } /**