diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-01-21 08:35:41 -0800 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-01-21 08:35:41 -0800 |
commit | 91e66eeee19cc07abc45e8e50a95e08bc9463d57 (patch) | |
tree | f6583a181183615f1915f0323ba87ad39897891e /apps/files_encryption/tests/stream.php | |
parent | 0dd54a12509445d3fa0b0649b278541f121bead5 (diff) | |
parent | f09c19c31607ed212afd031fbbd582657f30dcc8 (diff) | |
download | nextcloud-server-91e66eeee19cc07abc45e8e50a95e08bc9463d57.tar.gz nextcloud-server-91e66eeee19cc07abc45e8e50a95e08bc9463d57.zip |
Merge pull request #6868 from owncloud/enc-fixrandomfailunittest
Replaced time() with uniqid() to make sure the file name is unique
Diffstat (limited to 'apps/files_encryption/tests/stream.php')
-rw-r--r-- | apps/files_encryption/tests/stream.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 2767bbe512b..fed2e7d89d1 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -99,7 +99,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase { } function testStreamOptions() { - $filename = '/tmp-' . time(); + $filename = '/tmp-' . uniqid(); $view = new \OC\Files\View('/' . $this->userId . '/files'); // Save short data as encrypted file using stream wrapper @@ -122,7 +122,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase { } function testStreamSetBlocking() { - $filename = '/tmp-' . time(); + $filename = '/tmp-' . uniqid(); $view = new \OC\Files\View('/' . $this->userId . '/files'); // Save short data as encrypted file using stream wrapper @@ -144,7 +144,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase { * @medium */ function testStreamSetTimeout() { - $filename = '/tmp-' . time(); + $filename = '/tmp-' . uniqid(); $view = new \OC\Files\View('/' . $this->userId . '/files'); // Save short data as encrypted file using stream wrapper @@ -163,7 +163,7 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase { } function testStreamSetWriteBuffer() { - $filename = '/tmp-' . time(); + $filename = '/tmp-' . uniqid(); $view = new \OC\Files\View('/' . $this->userId . '/files'); // Save short data as encrypted file using stream wrapper @@ -187,9 +187,9 @@ class Test_Encryption_Stream extends \PHPUnit_Framework_TestCase { */ function testStreamFromLocalFile() { - $filename = '/' . $this->userId . '/files/' . 'tmp-' . time().'.txt'; + $filename = '/' . $this->userId . '/files/' . 'tmp-' . uniqid().'.txt'; - $tmpFilename = "/tmp/" . time() . ".txt"; + $tmpFilename = "/tmp/" . uniqid() . ".txt"; // write an encrypted file $cryptedFile = $this->view->file_put_contents($filename, $this->dataShort); |