aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/files/storage
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/files/storage')
-rw-r--r--tests/lib/files/storage/commontest.php7
-rw-r--r--tests/lib/files/storage/home.php9
-rw-r--r--tests/lib/files/storage/local.php7
-rw-r--r--tests/lib/files/storage/mappedlocal.php7
-rw-r--r--tests/lib/files/storage/mappedlocalwithdotteddatadir.php7
-rw-r--r--tests/lib/files/storage/wrapper/quota.php7
-rw-r--r--tests/lib/files/storage/wrapper/wrapper.php7
7 files changed, 36 insertions, 15 deletions
diff --git a/tests/lib/files/storage/commontest.php b/tests/lib/files/storage/commontest.php
index ce53c884f32..2b70dc8713e 100644
--- a/tests/lib/files/storage/commontest.php
+++ b/tests/lib/files/storage/commontest.php
@@ -27,12 +27,15 @@ class CommonTest extends Storage {
* @var string tmpDir
*/
private $tmpDir;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir=\OC_Helper::tmpFolder();
$this->instance=new \OC\Files\Storage\CommonTest(array('datadir'=>$this->tmpDir));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
+ parent::tearDown();
}
}
diff --git a/tests/lib/files/storage/home.php b/tests/lib/files/storage/home.php
index d085efe9c1c..b0670a22892 100644
--- a/tests/lib/files/storage/home.php
+++ b/tests/lib/files/storage/home.php
@@ -60,15 +60,18 @@ class Home extends Storage {
*/
private $user;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir = \OC_Helper::tmpFolder();
- $this->userId = uniqid('user_');
+ $this->userId = $this->getUniqueID('user_');
$this->user = new DummyUser($this->userId, $this->tmpDir);
$this->instance = new \OC\Files\Storage\Home(array('user' => $this->user));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
+ parent::tearDown();
}
/**
diff --git a/tests/lib/files/storage/local.php b/tests/lib/files/storage/local.php
index 490086c62f2..d2b27117c3b 100644
--- a/tests/lib/files/storage/local.php
+++ b/tests/lib/files/storage/local.php
@@ -28,13 +28,16 @@ class Local extends Storage {
*/
private $tmpDir;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir = \OC_Helper::tmpFolder();
$this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
+ parent::tearDown();
}
public function testStableEtag() {
diff --git a/tests/lib/files/storage/mappedlocal.php b/tests/lib/files/storage/mappedlocal.php
index b483f3a1954..1e87b53d00a 100644
--- a/tests/lib/files/storage/mappedlocal.php
+++ b/tests/lib/files/storage/mappedlocal.php
@@ -27,14 +27,17 @@ class MappedLocal extends Storage {
* @var string tmpDir
*/
private $tmpDir;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir=\OC_Helper::tmpFolder();
$this->instance=new \OC\Files\Storage\MappedLocal(array('datadir'=>$this->tmpDir));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
unset($this->instance);
+ parent::tearDown();
}
}
diff --git a/tests/lib/files/storage/mappedlocalwithdotteddatadir.php b/tests/lib/files/storage/mappedlocalwithdotteddatadir.php
index d2e5e2e97af..3a733b7b469 100644
--- a/tests/lib/files/storage/mappedlocalwithdotteddatadir.php
+++ b/tests/lib/files/storage/mappedlocalwithdotteddatadir.php
@@ -28,15 +28,18 @@ class MappedLocalWithDottedDataDir extends Storage {
*/
private $tmpDir;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir = \OC_Helper::tmpFolder().'dir.123'.DIRECTORY_SEPARATOR;
mkdir($this->tmpDir);
$this->instance=new \OC\Files\Storage\MappedLocal(array('datadir'=>$this->tmpDir));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
unset($this->instance);
+ parent::tearDown();
}
}
diff --git a/tests/lib/files/storage/wrapper/quota.php b/tests/lib/files/storage/wrapper/quota.php
index 954fe199cc8..9e6b1c85a95 100644
--- a/tests/lib/files/storage/wrapper/quota.php
+++ b/tests/lib/files/storage/wrapper/quota.php
@@ -17,14 +17,17 @@ class Quota extends \Test\Files\Storage\Storage {
*/
private $tmpDir;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir = \OC_Helper::tmpFolder();
$storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
$this->instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 10000000));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
+ parent::tearDown();
}
/**
diff --git a/tests/lib/files/storage/wrapper/wrapper.php b/tests/lib/files/storage/wrapper/wrapper.php
index 8bcf42035d4..486cd0495c1 100644
--- a/tests/lib/files/storage/wrapper/wrapper.php
+++ b/tests/lib/files/storage/wrapper/wrapper.php
@@ -14,14 +14,17 @@ class Wrapper extends \Test\Files\Storage\Storage {
*/
private $tmpDir;
- public function setUp() {
+ protected function setUp() {
+ parent::setUp();
+
$this->tmpDir = \OC_Helper::tmpFolder();
$storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
$this->instance = new \OC\Files\Storage\Wrapper\Wrapper(array('storage' => $storage));
}
- public function tearDown() {
+ protected function tearDown() {
\OC_Helper::rmdirr($this->tmpDir);
+ parent::tearDown();
}
public function testInstanceOfStorageWrapper() {