diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-15 09:41:51 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-01-20 21:12:26 +0100 |
commit | 717697313b07106fd7941b83ff0271272c2c7791 (patch) | |
tree | 5a7b062392ea014f952fa8e43c07724be8059f8f /apps/files_sharing/lib | |
parent | 0ebc92c44ab6332e74e88fb3a32e860139417677 (diff) | |
download | nextcloud-server-717697313b07106fd7941b83ff0271272c2c7791.tar.gz nextcloud-server-717697313b07106fd7941b83ff0271272c2c7791.zip |
[Share 2.0] Move tests over the sharemanager
Nice side effect... pure unit tests!
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/controllers/sharecontroller.php | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php index bf4f297260d..f701a66dd0f 100644 --- a/apps/files_sharing/lib/controllers/sharecontroller.php +++ b/apps/files_sharing/lib/controllers/sharecontroller.php @@ -41,9 +41,12 @@ use OCP\IRequest; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\NotFoundResponse; -use OC\URLGenerator; -use OC\AppConfig; +use OCP\IURLGenerator; +use OCP\IConfig; use OCP\ILogger; +use OCP\IUserManager; +use OCP\ISession; +use OCP\IPreview; use OCA\Files_Sharing\Helper; use OCP\Util; use OCA\Files_Sharing\Activity; @@ -57,57 +60,47 @@ use \OC\Share20\IShare; */ class ShareController extends Controller { - /** @var \OC\User\Session */ - protected $userSession; - /** @var \OC\AppConfig */ - protected $appConfig; - /** @var \OCP\IConfig */ + /** @var IConfig */ protected $config; - /** @var \OC\URLGenerator */ + /** @var IURLGenerator */ protected $urlGenerator; - /** @var \OC\User\Manager */ + /** @var IUserManager */ protected $userManager; - /** @var \OCP\ILogger */ + /** @var ILogger */ protected $logger; /** @var OCP\Activity\IManager */ protected $activityManager; /** @var OC\Share20\Manager */ protected $shareManager; - /** @var \OCP\ISession */ + /** @var ISession */ protected $session; - /** @var \OCP\IPreview */ + /** @var IPreview */ protected $previewManager; /** * @param string $appName * @param IRequest $request - * @param OC\User\Session $userSession - * @param AppConfig $appConfig - * @param OCP\IConfig $config - * @param URLGenerator $urlGenerator - * @param OCP\IUserManager $userManager + * @param IConfig $config + * @param IURLGenerator $urlGenerator + * @param IUserManager $userManager * @param ILogger $logger * @param OCP\Activity\IManager $activityManager * @param \OC\Share20\Manager $shareManager - * @param \OCP\ISession $session - * @param \OCP\IPreview $previewManager + * @param ISession $session + * @param IPreview $previewManager */ public function __construct($appName, IRequest $request, - OC\User\Session $userSession, - AppConfig $appConfig, - OCP\IConfig $config, - URLGenerator $urlGenerator, - OCP\IUserManager $userManager, + IConfig $config, + IURLGenerator $urlGenerator, + IUserManager $userManager, ILogger $logger, - OCP\Activity\IManager $activityManager, + \OCP\Activity\IManager $activityManager, \OC\Share20\Manager $shareManager, - \OCP\ISession $session, - \OCP\IPreview $previewManager) { + ISession $session, + IPreview $previewManager) { parent::__construct($appName, $request); - $this->userSession = $userSession; - $this->appConfig = $appConfig; $this->config = $config; $this->urlGenerator = $urlGenerator; $this->userManager = $userManager; |