summaryrefslogtreecommitdiffstats
path: root/tests/lib/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-12-18 11:19:53 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-12-18 11:19:53 +0100
commit90b0831cec88763038e241cc4816db204c045e69 (patch)
tree060da11646fe3d34db61b6b4be9d6d001bb9d090 /tests/lib/files
parent6a7dbf3cf24125bfac5089a4fae0a305591410de (diff)
downloadnextcloud-server-90b0831cec88763038e241cc4816db204c045e69.tar.gz
nextcloud-server-90b0831cec88763038e241cc4816db204c045e69.zip
Use TempManager instead of tmpFolder
Diffstat (limited to 'tests/lib/files')
-rw-r--r--tests/lib/files/cache/homecache.php2
-rw-r--r--tests/lib/files/etagtest.php2
-rw-r--r--tests/lib/files/filesystem.php4
-rw-r--r--tests/lib/files/storage/commontest.php2
-rw-r--r--tests/lib/files/storage/home.php2
-rw-r--r--tests/lib/files/storage/local.php2
-rw-r--r--tests/lib/files/storage/wrapper/quota.php2
-rw-r--r--tests/lib/files/storage/wrapper/wrapper.php2
-rw-r--r--tests/lib/files/view.php2
9 files changed, 10 insertions, 10 deletions
diff --git a/tests/lib/files/cache/homecache.php b/tests/lib/files/cache/homecache.php
index 3adb25fa9d4..e133d0afc55 100644
--- a/tests/lib/files/cache/homecache.php
+++ b/tests/lib/files/cache/homecache.php
@@ -69,7 +69,7 @@ class HomeCache extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- $this->user = new DummyUser('foo', \OC_Helper::tmpFolder());
+ $this->user = new DummyUser('foo', \OC::$server->getTempManager()->getTemporaryFolder());
$this->storage = new \OC\Files\Storage\Home(array('user' => $this->user));
$this->cache = $this->storage->getCache();
}
diff --git a/tests/lib/files/etagtest.php b/tests/lib/files/etagtest.php
index c214a3d4da6..d8e44000f9c 100644
--- a/tests/lib/files/etagtest.php
+++ b/tests/lib/files/etagtest.php
@@ -39,7 +39,7 @@ class EtagTest extends \Test\TestCase {
$config = \OC::$server->getConfig();
$this->datadir = $config->getSystemValue('datadirectory');
- $this->tmpDir = \OC_Helper::tmpFolder();
+ $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$config->setSystemValue('datadirectory', $this->tmpDir);
$this->userBackend = new \Test\Util\User\Dummy();
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index de8979affd1..328ba5f4488 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -72,7 +72,7 @@ class Filesystem extends \Test\TestCase {
* @return array
*/
private function getStorageData() {
- $dir = \OC_Helper::tmpFolder();
+ $dir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->tmpDirs[] = $dir;
return array('datadir' => $dir);
}
@@ -416,7 +416,7 @@ class Filesystem extends \Test\TestCase {
$config = \OC::$server->getConfig();
$oldCachePath = $config->getSystemValue('cache_path', '');
// set cache path to temp dir
- $cachePath = \OC_Helper::tmpFolder() . '/extcache';
+ $cachePath = \OC::$server->getTempManager()->getTemporaryFolder() . '/extcache';
$config->setSystemValue('cache_path', $cachePath);
\OC::$server->getUserManager()->createUser($userId, $userId);
diff --git a/tests/lib/files/storage/commontest.php b/tests/lib/files/storage/commontest.php
index bbe6f2a73e2..38faa9b0b21 100644
--- a/tests/lib/files/storage/commontest.php
+++ b/tests/lib/files/storage/commontest.php
@@ -37,7 +37,7 @@ class CommonTest extends Storage {
protected function setUp() {
parent::setUp();
- $this->tmpDir=\OC_Helper::tmpFolder();
+ $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->instance=new \OC\Files\Storage\CommonTest(array('datadir'=>$this->tmpDir));
}
diff --git a/tests/lib/files/storage/home.php b/tests/lib/files/storage/home.php
index a51912ca1b2..7e10f09d554 100644
--- a/tests/lib/files/storage/home.php
+++ b/tests/lib/files/storage/home.php
@@ -70,7 +70,7 @@ class Home extends Storage {
protected function setUp() {
parent::setUp();
- $this->tmpDir = \OC_Helper::tmpFolder();
+ $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->userId = $this->getUniqueID('user_');
$this->user = new DummyUser($this->userId, $this->tmpDir);
$this->instance = new \OC\Files\Storage\Home(array('user' => $this->user));
diff --git a/tests/lib/files/storage/local.php b/tests/lib/files/storage/local.php
index 36267dc6605..2583863b554 100644
--- a/tests/lib/files/storage/local.php
+++ b/tests/lib/files/storage/local.php
@@ -38,7 +38,7 @@ class Local extends Storage {
protected function setUp() {
parent::setUp();
- $this->tmpDir = \OC_Helper::tmpFolder();
+ $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
}
diff --git a/tests/lib/files/storage/wrapper/quota.php b/tests/lib/files/storage/wrapper/quota.php
index b0a06b0d898..95bc2ff7a1a 100644
--- a/tests/lib/files/storage/wrapper/quota.php
+++ b/tests/lib/files/storage/wrapper/quota.php
@@ -27,7 +27,7 @@ class Quota extends \Test\Files\Storage\Storage {
protected function setUp() {
parent::setUp();
- $this->tmpDir = \OC_Helper::tmpFolder();
+ $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
$this->instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 10000000));
}
diff --git a/tests/lib/files/storage/wrapper/wrapper.php b/tests/lib/files/storage/wrapper/wrapper.php
index 486cd0495c1..a5a678cb9f7 100644
--- a/tests/lib/files/storage/wrapper/wrapper.php
+++ b/tests/lib/files/storage/wrapper/wrapper.php
@@ -17,7 +17,7 @@ class Wrapper extends \Test\Files\Storage\Storage {
protected function setUp() {
parent::setUp();
- $this->tmpDir = \OC_Helper::tmpFolder();
+ $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
$this->instance = new \OC\Files\Storage\Wrapper\Wrapper(array('storage' => $storage));
}
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index 1fc4b9ab684..3e88a5306f8 100644
--- a/tests/lib/files/view.php
+++ b/tests/lib/files/view.php
@@ -757,7 +757,7 @@ class View extends \Test\TestCase {
* 228 is the max path length in windows
*/
$folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789';
- $tmpdirLength = strlen(\OC_Helper::tmpFolder());
+ $tmpdirLength = strlen(\OC::$server->getTempManager()->getTemporaryFolder());
if (\OC_Util::runningOnWindows()) {
$this->markTestSkipped('[Windows] ');
$depth = ((260 - $tmpdirLength) / 57);