Skip to content
Snippets Groups Projects
Commit 9c32b81e authored by Demian Katz's avatar Demian Katz
Browse files

Don't throw exceptions in teardown; it masks other problems.

parent eeaeee2e
No related merge requests found
...@@ -167,10 +167,9 @@ trait UserCreationTrait ...@@ -167,10 +167,9 @@ trait UserCreationTrait
$userTable = $test->getTable('User'); $userTable = $test->getTable('User');
foreach ((array)$users as $username) { foreach ((array)$users as $username) {
$user = $userTable->getByUsername($username, false); $user = $userTable->getByUsername($username, false);
if (empty($user)) { if (!empty($user)) {
throw new \Exception("Problem deleting expected user ($username)."); $user->delete();
} }
$user->delete();
} }
} }
} }
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment