summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/tests/util.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-01-29 16:33:27 +0100
committerRobin Appelman <icewind@owncloud.com>2014-01-29 16:33:27 +0100
commit4e2b52a376d2aab5e0f9d0034a8e2bfa196c08bd (patch)
tree78094fbe60703eae8e4eb1d5d7a42d249a515f21 /apps/files_encryption/tests/util.php
parentfc5f20112efe03b203978c4b1045ed70c2ce5e74 (diff)
parentf5f918b8bf5279fd174fe520c21f83c902904843 (diff)
downloadnextcloud-server-4e2b52a376d2aab5e0f9d0034a8e2bfa196c08bd.tar.gz
nextcloud-server-4e2b52a376d2aab5e0f9d0034a8e2bfa196c08bd.zip
merge master into fileinfo
Diffstat (limited to 'apps/files_encryption/tests/util.php')
-rwxr-xr-xapps/files_encryption/tests/util.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
index c789b9e2c10..228f7df1b90 100755
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
@@ -142,8 +142,8 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
self::loginHelper($this->userId);
- $unencryptedFile = '/tmpUnencrypted-' . time() . '.txt';
- $encryptedFile = '/tmpEncrypted-' . time() . '.txt';
+ $unencryptedFile = '/tmpUnencrypted-' . uniqid() . '.txt';
+ $encryptedFile = '/tmpEncrypted-' . uniqid() . '.txt';
// Disable encryption proxy to write a unencrypted file
$proxyStatus = \OC_FileProxy::$enabled;
@@ -254,7 +254,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
\OC_User::setUserId(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
- $filename = '/tmp-' . time() . '.test';
+ $filename = '/tmp-' . uniqid() . '.test';
// Disable encryption proxy to prevent recursive calls
$proxyStatus = \OC_FileProxy::$enabled;
@@ -282,7 +282,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
function testGetFileSize() {
\Test_Encryption_Util::loginHelper(\Test_Encryption_Util::TEST_ENCRYPTION_UTIL_USER1);
- $filename = 'tmp-' . time();
+ $filename = 'tmp-' . uniqid();
$externalFilename = '/' . $this->userId . '/files/' . $filename;
// Test for 0 byte files
@@ -318,7 +318,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
function testEncryptAll() {
- $filename = "/encryptAll" . time() . ".txt";
+ $filename = "/encryptAll" . uniqid() . ".txt";
$util = new Encryption\Util($this->view, $this->userId);
// disable encryption to upload a unencrypted file
@@ -350,7 +350,7 @@ class Test_Encryption_Util extends \PHPUnit_Framework_TestCase {
function testDecryptAll() {
- $filename = "/decryptAll" . time() . ".txt";
+ $filename = "/decryptAll" . uniqid() . ".txt";
$util = new Encryption\Util($this->view, $this->userId);
$this->view->file_put_contents($this->userId . '/files/' . $filename, $this->dataShort);