/** * Shares the file and folder, both publicly and with the tester * * Warning - File operations don't work properly in the test environment provided by core as * the cache is not updated and the scanner does not work. Do not attempt to rename or move * files */ private function createShares() { $this->coreTestCase->loginAsUser($this->sharerUserId); // Warning - File first or an error will be triggered because the file belongs to the folder $this->sharedFileToken = $this->createShare('file'); $this->sharedFolderToken = $this->createShare('folder'); $this->createShare('file', $this->userId); $this->createShare('folder', $this->userId); $this->coreTestCase->logoutUser(); }
protected function _after() { $this->coreTestCase->logoutUser(); $this->coreTestCase->tearDown(); }