diff options
Diffstat (limited to 'apps/files_encryption/tests/util.php')
-rwxr-xr-x | apps/files_encryption/tests/util.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index 203ba55dbfd..a29ef831a52 100755 --- a/apps/files_encryption/tests/util.php +++ b/apps/files_encryption/tests/util.php @@ -510,7 +510,11 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { */ public static function loginHelper($user, $create = false, $password = false) { if ($create) { - \OC_User::createUser($user, $user); + try { + \OC_User::createUser($user, $user); + } catch(\Exception $e) { // catch username is already being used from previous aborted runs + + } } if ($password === false) { @@ -520,8 +524,8 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase { \OC_Util::tearDownFS(); \OC_User::setUserId(''); \OC\Files\Filesystem::tearDown(); - \OC_Util::setupFS($user); \OC_User::setUserId($user); + \OC_Util::setupFS($user); $params['uid'] = $user; $params['password'] = $password; |