Skip to content

Commit c3981bd

Browse files
committed
test: fix broken test
1 parent 3b7607a commit c3981bd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/system/Models/DeleteModelTest.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ public function testThrowExceptionWhenSoftDeleteParamIsEmptyValue($emptyValue):
186186
*/
187187
public function testDontDeleteRowsWhenSoftDeleteParamIsEmpty($emptyValue): void
188188
{
189-
$this->expectException(DatabaseException::class);
190-
$this->expectExceptionMessage('Deletes are not allowed unless they contain a "where" or "like" clause.');
191-
192189
$this->seeInDatabase('user', ['name' => 'Derek Jones', 'deleted_at IS NULL' => null]);
193190

194-
$this->createModel(UserModel::class)->delete($emptyValue);
191+
try {
192+
$this->createModel(UserModel::class)->delete($emptyValue);
193+
} catch (DatabaseException $e) {
194+
// Do nothing.
195+
}
196+
195197
$this->seeInDatabase('user', ['name' => 'Derek Jones', 'deleted_at IS NULL' => null]);
196198
}
197199

0 commit comments

Comments
 (0)