Exemplo n.º 1
0
 protected function setUp()
 {
     parent::setUp();
     \OC_Hook::clear();
     \OCA\Files_Trashbin\Trashbin::registerHooks();
     $this->user = $this->getUniqueId('user');
     \OC::$server->getUserManager()->createUser($this->user, $this->user);
     // this will setup the FS
     $this->loginAsUser($this->user);
     \OCA\Files_Trashbin\Storage::setupStorage();
     $this->rootView = new \OC\Files\View('/');
     $this->userView = new \OC\Files\View('/' . $this->user . '/files/');
     $this->userView->file_put_contents('test.txt', 'foo');
 }