diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-01-21 16:19:26 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-01-21 16:31:58 +0100 |
commit | f09c19c31607ed212afd031fbbd582657f30dcc8 (patch) | |
tree | feea4b28b793995e314ba1e8e432d023bcc10d7d /apps/files_encryption/tests/webdav.php | |
parent | 0f794b6889d05508c86449dacdee3e05bd47d071 (diff) | |
download | nextcloud-server-f09c19c31607ed212afd031fbbd582657f30dcc8.tar.gz nextcloud-server-f09c19c31607ed212afd031fbbd582657f30dcc8.zip |
Replaced time() with uniqid() to make sure the file name is unique
The cache isn't cleared properly because unlink() doesn't remove the
cache entry which caused side-effects when reusing the same file name
(which randomly happens when time() returns the same value)
This fix first makes sure the unit tests don't fail any more.
The unlink() case with the cache will be investigated separately.
Diffstat (limited to 'apps/files_encryption/tests/webdav.php')
-rwxr-xr-x | apps/files_encryption/tests/webdav.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_encryption/tests/webdav.php b/apps/files_encryption/tests/webdav.php index a2a8ce6e34f..8e8b9c53cee 100755 --- a/apps/files_encryption/tests/webdav.php +++ b/apps/files_encryption/tests/webdav.php @@ -113,7 +113,7 @@ class Test_Encryption_Webdav extends \PHPUnit_Framework_TestCase { function testWebdavPUT() { // generate filename - $filename = '/tmp-' . time() . '.txt'; + $filename = '/tmp-' . uniqid() . '.txt'; // set server vars $_SERVER['REQUEST_METHOD'] = 'OPTIONS'; |