Skip to content

Commit 45e8200

Browse files
committed
Assert concrete exception messages
1 parent f5d70c5 commit 45e8200

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/pdo_sqlite/tests/subclasses/pdo_sqlite_transaction_mode.phpt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ try {
4242
$pdo2->rollBack();
4343
printf("Database is not locked\n");
4444
} catch (PDOException $e) {
45-
printf("Database is locked\n");
45+
printf("Database is locked: %s\n", $e->getMessage());
4646
}
4747
$pdo->rollBack();
4848

@@ -53,7 +53,7 @@ try {
5353
$pdo2->exec('begin immediate transaction');
5454
printf("Database is not locked\n");
5555
} catch (PDOException $e) {
56-
printf("Database is locked\n");
56+
printf("Database is locked: %s\n", $e->getMessage());
5757
}
5858
$pdo->rollBack();
5959

@@ -64,7 +64,7 @@ try {
6464
$pdo2->exec('begin immediate transaction');
6565
printf("Database is not locked\n");
6666
} catch (PDOException $e) {
67-
printf("Database is locked\n");
67+
printf("Database is locked: %s\n", $e->getMessage());
6868
}
6969
?>
7070
--EXPECT--
@@ -82,5 +82,5 @@ bool(false)
8282
bool(false)
8383
bool(false)
8484
Database is not locked
85-
Database is locked
86-
Database is locked
85+
Database is locked: SQLSTATE[HY000]: General error: 6 database table is locked
86+
Database is locked: SQLSTATE[HY000]: General error: 6 database schema is locked: main

0 commit comments

Comments
 (0)