Skip to content

Commit 0eadec9

Browse files
authored
Merge pull request #8 from mgalang/patch-2
Do not fail tests when user entity cleanup fails
2 parents 71a2409 + df6bb30 commit 0eadec9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Codeception/Module/DrupalUser.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ private function userCleanup() {
174174
/** @var \Drupal\user\Entity\User $user */
175175
foreach ($users as $user) {
176176
$this->deleteUsersContent($user->id());
177-
$user->delete();
177+
try {
178+
$user->delete();
179+
} catch (\Exception $e) {
180+
continue;
181+
}
178182
}
179183
}
180184
}

0 commit comments

Comments
 (0)