added unit tests

This commit is contained in:
2026-06-04 21:40:59 +02:00
parent d80a8de559
commit 48a619ee4b
64 changed files with 3807 additions and 33 deletions

View File

@ -56,6 +56,9 @@ function qdb_handler_fail(
?string $tmpDb = null,
$lockFp = null
): never {
if (defined('QDB_TESTING') && qdb_test_is_control_flow_exception($e)) {
throw $e;
}
if ($pdo !== null && $pdo->inTransaction()) {
try {
$pdo->rollBack();
@ -74,6 +77,9 @@ function qdb_handler_fail(
*/
function qdb_emit_api_error(Throwable $e, string $contextLabel): never
{
if (defined('QDB_TESTING') && qdb_test_is_control_flow_exception($e)) {
throw $e;
}
if (function_exists('qdb_api_log_note_exception')) {
qdb_api_log_note_exception($e);
}