From: Thomas Müller Date: Fri, 13 Sep 2013 19:44:31 +0000 (+0200) Subject: - giving the user a new id for each test run in order to prevent reuse of e.g. permis... X-Git-Tag: v6.0.0alpha2~182^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6eeb4d165c5a0eb0c49375aa4141c59d6a63f164;p=nextcloud-server.git - giving the user a new id for each test run in order to prevent reuse of e.g. permissions data in the database - setting the current user id because \OC\FilesView relies on \OC_User::getUser() --- diff --git a/tests/lib/files/node/integration.php b/tests/lib/files/node/integration.php index bc439c1aa0b..14e1d05853d 100644 --- a/tests/lib/files/node/integration.php +++ b/tests/lib/files/node/integration.php @@ -45,7 +45,8 @@ class IntegrationTests extends \PHPUnit_Framework_TestCase { \OC_Hook::connect('OC_Filesystem', 'post_rename', '\OC\Files\Cache\Updater', 'renameHook'); \OC_Hook::connect('OC_Filesystem', 'post_touch', '\OC\Files\Cache\Updater', 'touchHook'); - $user = new User('', new \OC_User_Dummy); + $user = new User(uniqid('user'), new \OC_User_Dummy); + \OC_User::setUserId($user->getUID()); $this->view = new View(); $this->root = new Root($manager, $this->view, $user); $storage = new Temporary(array());