Ejemplo n.º 1
0
 protected function setUp()
 {
     parent::setUp();
     $manager = \OC\Files\Filesystem::getMountManager();
     \OC_Hook::clear('OC_Filesystem');
     $user = new User($this->getUniqueID('user'), new \Test\Util\User\Dummy());
     $this->loginAsUser($user->getUID());
     $this->view = new View();
     $this->root = new Root($manager, $this->view, $user);
     $storage = new Temporary(array());
     $subStorage = new Temporary(array());
     $this->storages[] = $storage;
     $this->storages[] = $subStorage;
     $this->root->mount($storage, '/');
     $this->root->mount($subStorage, '/substorage/');
 }
Ejemplo n.º 2
0
 protected function setUp()
 {
     parent::setUp();
     $manager = \OC\Files\Filesystem::getMountManager();
     \OC_Hook::clear('OC_Filesystem');
     \OC_Hook::connect('OC_Filesystem', 'post_write', '\\OC\\Files\\Cache\\Updater', 'writeHook');
     \OC_Hook::connect('OC_Filesystem', 'post_delete', '\\OC\\Files\\Cache\\Updater', 'deleteHook');
     \OC_Hook::connect('OC_Filesystem', 'post_rename', '\\OC\\Files\\Cache\\Updater', 'renameHook');
     \OC_Hook::connect('OC_Filesystem', 'post_touch', '\\OC\\Files\\Cache\\Updater', 'touchHook');
     $user = new User($this->getUniqueID('user'), new \OC_User_Dummy());
     $this->loginAsUser($user->getUID());
     $this->view = new View();
     $this->root = new Root($manager, $this->view, $user);
     $storage = new Temporary(array());
     $subStorage = new Temporary(array());
     $this->storages[] = $storage;
     $this->storages[] = $subStorage;
     $this->root->mount($storage, '/');
     $this->root->mount($subStorage, '/substorage/');
 }