File tree 3 files changed +6
-0
lines changed
3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -427,6 +427,7 @@ public function testJoinDelete(): void
427
427
$ user = $ user ->getModel ()->load (1 );
428
428
429
429
$ this ->expectException (Exception::class);
430
+ $ this ->expectExceptionMessage ('Unable to delete due to query error ' );
430
431
try {
431
432
$ user ->delete ();
432
433
} catch (Exception $ e ) {
Original file line number Diff line number Diff line change @@ -222,6 +222,7 @@ public function testSelectUnexistingColumnException(): void
222
222
$ q = $ this ->q ('employee ' )->field ('Sqlite must use backticks for identifier escape ' );
223
223
224
224
$ this ->expectException (Exception::class);
225
+ $ this ->expectExceptionMessage ('Dsql execute error ' );
225
226
$ q ->executeStatement ();
226
227
}
227
228
@@ -308,6 +309,7 @@ public function testExecuteException(): void
308
309
$ q = $ this ->q ('non_existing_table ' )->field ('non_existing_field ' );
309
310
310
311
$ this ->expectException (ExecuteException::class);
312
+ $ this ->expectExceptionMessage ('Dsql execute error ' );
311
313
try {
312
314
$ q ->getOne ();
313
315
} catch (ExecuteException $ e ) {
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ public function testCreateIndexUnique(): void
120
120
], $ client ->export ());
121
121
122
122
$ this ->expectException (Exception::class);
123
+ $ this ->expectExceptionMessage ('Unable to execute insert query ' );
123
124
try {
124
125
$ client ->insert (['name ' => 'Michael ' ]);
125
126
} catch (Exception $ e ) {
@@ -190,6 +191,7 @@ public function testForeignKeyViolation(): void
190
191
$ client ->insert (['name ' => 'Ewa ' , 'created_by_client_id ' => $ clientId ]);
191
192
192
193
$ this ->expectException (Exception::class);
194
+ $ this ->expectExceptionMessage ('Unable to execute insert query ' );
193
195
try {
194
196
$ invoice ->insert (['client_id ' => 50 ]);
195
197
} catch (Exception $ e ) {
@@ -263,6 +265,7 @@ public function testForeignKeyViolationWithoutPk(): void
263
265
}
264
266
265
267
$ this ->expectException (Exception::class);
268
+ $ this ->expectExceptionMessage ('Unable to execute insert query ' );
266
269
try {
267
270
$ price ->insert (['amount ' => 5 , 'currency ' => 'JPY ' ]);
268
271
} catch (Exception $ e ) {
You can’t perform that action at this time.
0 commit comments