diff options
Diffstat (limited to 'apps/files_encryption/tests/util.php')
-rwxr-xr-x | apps/files_encryption/tests/util.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index b1904cbadc7..97e3c518dac 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); |