diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-05-07 19:42:46 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-05-08 16:53:05 +0200 |
commit | ba9db1964053be769b42452fee65ac4720489f81 (patch) | |
tree | 90dbf2cee5496afcabce62cb15ad5c2c7dc75af6 /tests | |
parent | e8a80c6c2fac222ddd4dd40de5ab8bab5cef9fec (diff) | |
download | nextcloud-server-ba9db1964053be769b42452fee65ac4720489f81.tar.gz nextcloud-server-ba9db1964053be769b42452fee65ac4720489f81.zip |
Add wrapper storage backend
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/storage/wrapper.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/lib/files/storage/wrapper.php b/tests/lib/files/storage/wrapper.php new file mode 100644 index 00000000000..8452949a723 --- /dev/null +++ b/tests/lib/files/storage/wrapper.php @@ -0,0 +1,26 @@ +<?php +/** + * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Files\Storage; + +class Wrapper extends Storage { + /** + * @var string tmpDir + */ + private $tmpDir; + + public function setUp() { + $this->tmpDir = \OC_Helper::tmpFolder(); + $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir)); + $this->instance = new \OC\Files\Storage\Wrapper(array('storage' => $storage)); + } + + public function tearDown() { + \OC_Helper::rmdirr($this->tmpDir); + } +} |