aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/filesystem.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-12-03 17:49:10 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-12-03 17:49:10 +0100
commit3d9c72d2d9c4586902f49b00d58e9a02333aabb1 (patch)
tree878b7fb0cdfb865f1614be0376dc639379e30505 /tests/lib/files/filesystem.php
parentc90c9eb3e8f3e372b73cbad320b463dd6739764d (diff)
parentea4c25609dd23345fa1f639479421ff318e6f6c9 (diff)
downloadnextcloud-server-3d9c72d2d9c4586902f49b00d58e9a02333aabb1.tar.gz
nextcloud-server-3d9c72d2d9c4586902f49b00d58e9a02333aabb1.zip
Merge pull request #12544 from owncloud/fix-windows-unittests
Replace uniqid calls with $this->getUniqueID so tests pass again on windows
Diffstat (limited to 'tests/lib/files/filesystem.php')
-rw-r--r--tests/lib/files/filesystem.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index 746600c7d15..1b84db0fc0d 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -189,7 +189,7 @@ class Filesystem extends \Test\TestCase {
if (\OC\Files\Filesystem::getView()) {
$user = \OC_User::getUser();
} else {
- $user = uniqid();
+ $user = $this->getUniqueID();
\OC\Files\Filesystem::init($user, '/' . $user . '/files');
}
\OC_Hook::clear('OC_Filesystem');
@@ -217,7 +217,7 @@ class Filesystem extends \Test\TestCase {
*/
public function testLocalMountWhenUserDoesNotExist() {
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
- $userId = uniqid('user_');
+ $userId = $this->getUniqueID('user_');
\OC\Files\Filesystem::initMountPoints($userId);
@@ -231,7 +231,7 @@ class Filesystem extends \Test\TestCase {
* Tests that the home storage is used for the user's mount point
*/
public function testHomeMount() {
- $userId = uniqid('user_');
+ $userId = $this->getUniqueID('user_');
\OC_User::createUser($userId, $userId);
@@ -251,7 +251,7 @@ class Filesystem extends \Test\TestCase {
*/
public function testLegacyHomeMount() {
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
- $userId = uniqid('user_');
+ $userId = $this->getUniqueID('user_');
// insert storage into DB by constructing it
// to make initMountsPoint find its existence
@@ -281,7 +281,7 @@ class Filesystem extends \Test\TestCase {
* Test that the default cache dir is part of the user's home
*/
public function testMountDefaultCacheDir() {
- $userId = uniqid('user_');
+ $userId = $this->getUniqueID('user_');
$oldCachePath = \OC_Config::getValue('cache_path', '');
// no cache path configured
\OC_Config::setValue('cache_path', '');
@@ -306,7 +306,7 @@ class Filesystem extends \Test\TestCase {
* the user's home
*/
public function testMountExternalCacheDir() {
- $userId = uniqid('user_');
+ $userId = $this->getUniqueID('user_');
$oldCachePath = \OC_Config::getValue('cache_path', '');
// set cache path to temp dir