Skip to content

Commit

Permalink
Fixes unity tests
Browse files Browse the repository at this point in the history
  • Loading branch information
papac committed Aug 21, 2023
1 parent 364ef3a commit 85de991
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Database/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ public static function table(string $table): QueryBuilder
* @param callable $callback
* @return void
*/
public static function startTransaction(): mixed
public static function startTransaction(): void
{
static::verifyConnection();

Expand Down
2 changes: 1 addition & 1 deletion tests/Database/Query/DatabaseQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public function test_transaction_table(string $name)

$database->insert("insert into pets values(:id, :name);", ["id" => 1, 'name' => 'Ploy']);
$result = 0;
$database->startTransaction(function () use ($database, &$result) {
$database->transaction(function () use ($database, &$result) {
$result = $database->delete("delete from pets where id = :id", ['id' => 1]);
$this->assertEquals($database->inTransaction(), true);
});
Expand Down

0 comments on commit 85de991

Please sign in to comment.