Skip to content

Commit 2381f51

Browse files
committed
test(database): address transaction callback review notes
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent 54507dc commit 2381f51

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/system/Database/Live/TransactionCallbacksTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323

2424
/**
2525
* @internal
26-
*
27-
* @no-final
2826
*/
2927
#[Group('DatabaseLive')]
30-
class TransactionCallbacksTest extends CIUnitTestCase
28+
final class TransactionCallbacksTest extends CIUnitTestCase
3129
{
3230
use DatabaseTestTrait;
3331

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?php
22

33
$this->db->afterCommit(static function (): void {
4-
// Runs immediately because there is no active transaction.
4+
// Runs immediately because no transaction has started yet.
55
});
6+
7+
$this->db->transStart();
8+
$this->db->query('AN SQL QUERY...');
9+
$this->db->transComplete();

0 commit comments

Comments
 (0)