summaryrefslogtreecommitdiffstats
path: root/tests/lib/testcase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/testcase.php')
-rw-r--r--tests/lib/testcase.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/lib/testcase.php b/tests/lib/testcase.php
index 3b7ad2a9632..c1ebfb025cf 100644
--- a/tests/lib/testcase.php
+++ b/tests/lib/testcase.php
@@ -174,7 +174,9 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::tearDown();
\OC_User::setUserId($user);
\OC_Util::setupFS($user);
- \OC::$server->getUserFolder($user);
+ if (\OC_User::userExists($user)) {
+ \OC::$server->getUserFolder($user);
+ }
}
/**