Browse Source

Fix tests on PHP 8.2

ADmad 3 years ago
parent
commit
066c11494c
1 changed files with 6 additions and 0 deletions
  1. 6 0
      tests/TestCase/Database/ConnectionTest.php

+ 6 - 0
tests/TestCase/Database/ConnectionTest.php

@@ -1206,6 +1206,9 @@ class ConnectionTest extends TestCase
                     return false;
                 });
                 $this->rollbackSourceLine = __LINE__ - 1;
+                if (PHP_VERSION_ID >= 80200) {
+                    $this->rollbackSourceLine -= 2;
+                }
 
                 return true;
             });
@@ -1244,6 +1247,9 @@ class ConnectionTest extends TestCase
                         return false;
                     });
                     $this->rollbackSourceLine = __LINE__ - 1;
+                    if (PHP_VERSION_ID >= 80200) {
+                        $this->rollbackSourceLine -= 2;
+                    }
 
                     $this->pushNestedTransactionState();