diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-04 14:06:42 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-10-04 14:06:42 +0200 |
commit | aebc330f269f3e88f2891cd13009cde2d50eb59a (patch) | |
tree | 7398bc68d581d01b18ba3e9e79c82491f1ecf871 /tests/lib/cache/file.php | |
parent | c62dc4fa80d622ed7651029e9ddff2a6c6327143 (diff) | |
parent | 800bf0769ff4ea63c5dcc77eaaf1bce669b73d13 (diff) | |
download | nextcloud-server-aebc330f269f3e88f2891cd13009cde2d50eb59a.tar.gz nextcloud-server-aebc330f269f3e88f2891cd13009cde2d50eb59a.zip |
Merge branch 'master' into fixing-4011-master
Diffstat (limited to 'tests/lib/cache/file.php')
-rw-r--r-- | tests/lib/cache/file.php | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/tests/lib/cache/file.php b/tests/lib/cache/file.php index 038cb21b257..3767c83fcb1 100644 --- a/tests/lib/cache/file.php +++ b/tests/lib/cache/file.php @@ -20,7 +20,9 @@ * */ -class Test_Cache_File extends Test_Cache { +namespace Test\Cache; + +class FileCache extends \Test_Cache { private $user; private $datadir; @@ -30,8 +32,8 @@ class Test_Cache_File extends Test_Cache { public function setUp() { //clear all proxies and hooks so we can do clean testing - OC_FileProxy::clearProxies(); - OC_Hook::clear('OC_Filesystem'); + \OC_FileProxy::clearProxies(); + \OC_Hook::clear('OC_Filesystem'); //disabled atm //enable only the encryption hook if needed @@ -44,27 +46,27 @@ class Test_Cache_File extends Test_Cache { $storage = new \OC\Files\Storage\Temporary(array()); \OC\Files\Filesystem::mount($storage,array(),'/'); $datadir = str_replace('local::', '', $storage->getId()); - $this->datadir = OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data'); - OC_Config::setValue('datadirectory', $datadir); + $this->datadir = \OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data'); + \OC_Config::setValue('datadirectory', $datadir); - OC_User::clearBackends(); - OC_User::useBackend(new OC_User_Dummy()); + \OC_User::clearBackends(); + \OC_User::useBackend(new \OC_User_Dummy()); //login - OC_User::createUser('test', 'test'); + \OC_User::createUser('test', 'test'); - $this->user=OC_User::getUser(); - OC_User::setUserId('test'); + $this->user = \OC_User::getUser(); + \OC_User::setUserId('test'); //set up the users dir - $rootView=new \OC\Files\View(''); + $rootView = new \OC\Files\View(''); $rootView->mkdir('/test'); - $this->instance=new OC_Cache_File(); + $this->instance=new \OC\Cache\File(); } public function tearDown() { - OC_User::setUserId($this->user); - OC_Config::setValue('datadirectory', $this->datadir); + \OC_User::setUserId($this->user); + \OC_Config::setValue('datadirectory', $this->datadir); } } |