示例#1
0
文件: homecache.php 项目: evanjt/core
 protected function setUp()
 {
     parent::setUp();
     $this->user = new DummyUser('foo', \OC_Helper::tmpFolder());
     $this->storage = new \OC\Files\Storage\Home(array('user' => $this->user));
     $this->cache = $this->storage->getCache();
 }
示例#2
0
 protected function setUp()
 {
     parent::setUp();
     $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();
 }
示例#3
0
 /**
  * @param string $userName
  * @return integer
  */
 public function byUsername($userName)
 {
     $data = new Home(array('user' => \OC_User::getManager()->get($userName)));
     return KiloBytes::allocateUnits($data->getCache('files')->calculateFolderSize('files'))->units();
 }