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(); }
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(); }
/** * @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(); }