/** * @expectedException \OCA\Gallery\Environment\NotFoundEnvException */ public function testGetDisplayName() { $userId = null; $userFolder = null; $this->mockSetEnvironment($userId, $userFolder); $this->environment->getDisplayName(); }
/** * Shows the albums and pictures the token gives access to * * @param $token * * @return TemplateResponse */ private function showPublicPage($token) { $albumName = $this->environment->getSharedFolderName(); list($server2ServerSharing, $protected) = $this->getServer2ServerProperties(); // Parameters sent to the template $params = ['appName' => $this->appName, 'token' => $token, 'displayName' => $this->environment->getDisplayName(), 'albumName' => $albumName, 'server2ServerSharing' => $server2ServerSharing, 'protected' => $protected, 'filename' => $albumName]; // Will render the page using the template found in templates/public.php $response = new TemplateResponse($this->appName, 'public', $params, 'public'); $this->addContentSecurityToResponse($response); return $response; }