diff options
author | Joas Schilling <coding@schilljs.com> | 2017-01-09 12:03:34 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-01-09 12:03:34 +0100 |
commit | bb84db02cb70233b5e989f596a8eda059ba38dc7 (patch) | |
tree | 0565847c4bd8b28581cd8bfbd0dbf56a7c8671ee /apps/comments | |
parent | 315645ada343946aa3c27f874b36b7ded6b3ff50 (diff) | |
download | nextcloud-server-bb84db02cb70233b5e989f596a8eda059ba38dc7.tar.gz nextcloud-server-bb84db02cb70233b5e989f596a8eda059ba38dc7.zip |
Cleanup comment tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/comments')
-rw-r--r-- | apps/comments/lib/Notification/Listener.php | 9 | ||||
-rw-r--r-- | apps/comments/tests/Unit/Notification/ListenerTest.php | 8 |
2 files changed, 4 insertions, 13 deletions
diff --git a/apps/comments/lib/Notification/Listener.php b/apps/comments/lib/Notification/Listener.php index 2f94b8a3d75..365f93ce8dd 100644 --- a/apps/comments/lib/Notification/Listener.php +++ b/apps/comments/lib/Notification/Listener.php @@ -23,7 +23,6 @@ namespace OCA\Comments\Notification; use OCP\Comments\CommentsEvent; use OCP\Comments\IComment; -use OCP\IURLGenerator; use OCP\IUserManager; use OCP\Notification\IManager; @@ -34,25 +33,19 @@ class Listener { /** @var IUserManager */ protected $userManager; - /** @var IURLGenerator */ - protected $urlGenerator; - /** * Listener constructor. * * @param IManager $notificationManager * @param IUserManager $userManager - * @param IURLGenerator $urlGenerator */ public function __construct( IManager $notificationManager, - IUserManager $userManager, - IURLGenerator $urlGenerator + IUserManager $userManager ) { $this->notificationManager = $notificationManager; $this->userManager = $userManager; - $this->urlGenerator = $urlGenerator; } /** diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php index 3007b78cb3d..ef84d1c60de 100644 --- a/apps/comments/tests/Unit/Notification/ListenerTest.php +++ b/apps/comments/tests/Unit/Notification/ListenerTest.php @@ -46,14 +46,12 @@ class ListenerTest extends TestCase { protected function setUp() { parent::setUp(); - $this->notificationManager = $this->getMockBuilder('\OCP\Notification\IManager')->getMock(); - $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock(); - $this->urlGenerator = $this->getMockBuilder('OCP\IURLGenerator')->getMock(); + $this->notificationManager = $this->createMock(\OCP\Notification\IManager::class); + $this->userManager = $this->createMock(\OCP\IUserManager::class); $this->listener = new Listener( $this->notificationManager, - $this->userManager, - $this->urlGenerator + $this->userManager ); } |