summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-03-19 10:54:39 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-03-19 10:54:39 +0100
commit1088068c60d4d085b5751485cf233459d5b0fe3f (patch)
tree9e03b90f294248155cd6249df8cf39f1f91e7aba /tests
parent47a300814186061991821f8a707c63a3de636b6d (diff)
downloadnextcloud-server-1088068c60d4d085b5751485cf233459d5b0fe3f.tar.gz
nextcloud-server-1088068c60d4d085b5751485cf233459d5b0fe3f.zip
Remove \OCP\Files::tmpFolder
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Archive/TestBase.php2
-rw-r--r--tests/lib/UtilTest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/Archive/TestBase.php b/tests/lib/Archive/TestBase.php
index 80750a1694c..bdfe65d4304 100644
--- a/tests/lib/Archive/TestBase.php
+++ b/tests/lib/Archive/TestBase.php
@@ -112,7 +112,7 @@ abstract class TestBase extends \Test\TestCase {
public function testExtract() {
$dir=\OC::$SERVERROOT.'/tests/data';
$this->instance=$this->getExisting();
- $tmpDir=\OCP\Files::tmpFolder();
+ $tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
$this->instance->extract($tmpDir);
$this->assertEquals(true, file_exists($tmpDir.'lorem.txt'));
$this->assertEquals(true, file_exists($tmpDir.'dir/lorem.txt'));
diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php
index 18d065c68d6..d731085af46 100644
--- a/tests/lib/UtilTest.php
+++ b/tests/lib/UtilTest.php
@@ -332,13 +332,13 @@ class UtilTest extends \Test\TestCase {
}
public function testCheckDataDirectoryValidity() {
- $dataDir = \OCP\Files::tmpFolder();
+ $dataDir = \OC::$server->getTempManager()->getTemporaryFolder();
touch($dataDir . '/.ocdata');
$errors = \OC_Util::checkDataDirectoryValidity($dataDir);
$this->assertEmpty($errors);
\OCP\Files::rmdirr($dataDir);
- $dataDir = \OCP\Files::tmpFolder();
+ $dataDir = \OC::$server->getTempManager()->getTemporaryFolder();
// no touch
$errors = \OC_Util::checkDataDirectoryValidity($dataDir);
$this->assertNotEmpty($errors);