]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only require the interface
authorJoas Schilling <nickvergessen@owncloud.com>
Wed, 18 Nov 2015 09:34:52 +0000 (10:34 +0100)
committerJoas Schilling <nickvergessen@owncloud.com>
Mon, 30 Nov 2015 16:14:47 +0000 (17:14 +0100)
apps/files/lib/activity.php
apps/files/tests/activitytest.php

index c171b3bfabf160ba2bc612920e1b7f28255efcaa..132f4169deeeebffa1456e6acdac47c42d43b7b0 100644 (file)
@@ -22,7 +22,7 @@
 
 namespace OCA\Files;
 
-use OC\L10N\Factory;
+use OCP\L10N\IFactory;
 use OCP\Activity\IExtension;
 use OCP\Activity\IManager;
 use OCP\IConfig;
@@ -43,7 +43,7 @@ class Activity implements IExtension {
        /** @var IL10N */
        protected $l;
 
-       /** @var Factory */
+       /** @var IFactory */
        protected $languageFactory;
 
        /** @var IURLGenerator */
@@ -59,13 +59,13 @@ class Activity implements IExtension {
        protected $helper;
 
        /**
-        * @param Factory $languageFactory
+        * @param IFactory $languageFactory
         * @param IURLGenerator $URLGenerator
         * @param IManager $activityManager
         * @param ActivityHelper $helper
         * @param IConfig $config
         */
-       public function __construct(Factory $languageFactory, IURLGenerator $URLGenerator, IManager $activityManager, ActivityHelper $helper, IConfig $config) {
+       public function __construct(IFactory $languageFactory, IURLGenerator $URLGenerator, IManager $activityManager, ActivityHelper $helper, IConfig $config) {
                $this->languageFactory = $languageFactory;
                $this->URLGenerator = $URLGenerator;
                $this->l = $this->getL10N();
index f6a21a7db62f24c4a98461ccd268b16a6409e209..6a3424e727a72625d070d691d68d54bf3a6a5756 100644 (file)
@@ -30,19 +30,19 @@ class ActivityTest extends TestCase {
        /** @var \OC\ActivityManager */
        private $activityManager;
 
-       /** @var \PHPUnit_Framework_MockObject_MockObject */
+       /** @var \OCP\IRequest|\PHPUnit_Framework_MockObject_MockObject */
        protected $request;
 
-       /** @var \PHPUnit_Framework_MockObject_MockObject */
+       /** @var \OCP\IUserSession|\PHPUnit_Framework_MockObject_MockObject */
        protected $session;
 
-       /** @var \PHPUnit_Framework_MockObject_MockObject */
+       /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */
        protected $config;
 
-       /** @var \PHPUnit_Framework_MockObject_MockObject */
+       /** @var \OCA\Files\ActivityHelper|\PHPUnit_Framework_MockObject_MockObject */
        protected $activityHelper;
 
-       /** @var \PHPUnit_Framework_MockObject_MockObject */
+       /** @var \OCP\L10N\IFactory|\PHPUnit_Framework_MockObject_MockObject */
        protected $l10nFactory;
 
        /** @var \OCA\Files\Activity */
@@ -70,7 +70,7 @@ class ActivityTest extends TestCase {
                        $this->config
                );
 
-               $this->l10nFactory = $this->getMockBuilder('OC\L10N\Factory')
+               $this->l10nFactory = $this->getMockBuilder('OCP\L10N\IFactory')
                        ->disableOriginalConstructor()
                        ->getMock();
                $deL10n = $this->getMockBuilder('OC_L10N')