summaryrefslogtreecommitdiffstats
path: root/apps/comments
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-11 21:32:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-12 13:55:19 +0200
commit234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch)
tree880cec2bf4fe4846eff9fa5aa68d2671fb0495be /apps/comments
parent138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff)
downloadnextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz
nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/comments')
-rw-r--r--apps/comments/tests/Unit/Activity/ListenerTest.php20
-rw-r--r--apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php2
-rw-r--r--apps/comments/tests/Unit/Controller/NotificationsTest.php10
-rw-r--r--apps/comments/tests/Unit/EventHandlerTest.php12
-rw-r--r--apps/comments/tests/Unit/Notification/ListenerTest.php22
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php42
6 files changed, 54 insertions, 54 deletions
diff --git a/apps/comments/tests/Unit/Activity/ListenerTest.php b/apps/comments/tests/Unit/Activity/ListenerTest.php
index 9b73e80f03b..576cc7d9a25 100644
--- a/apps/comments/tests/Unit/Activity/ListenerTest.php
+++ b/apps/comments/tests/Unit/Activity/ListenerTest.php
@@ -46,22 +46,22 @@ class ListenerTest extends TestCase {
/** @var Listener */
protected $listener;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $activityManager;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IAppManager|\PHPUnit\Framework\MockObject\MockObject */
protected $appManager;
- /** @var IMountProviderCollection|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMountProviderCollection|\PHPUnit\Framework\MockObject\MockObject */
protected $mountProviderCollection;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
- /** @var IShareHelper|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IShareHelper|\PHPUnit\Framework\MockObject\MockObject */
protected $shareHelper;
protected function setUp(): void {
@@ -95,7 +95,7 @@ class ListenerTest extends TestCase {
->method('getObjectType')
->willReturn('files');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->createMock(CommentsEvent::class);
$event->expects($this->any())
->method('getComment')
@@ -104,13 +104,13 @@ class ListenerTest extends TestCase {
->method('getEvent')
->willReturn(CommentsEvent::EVENT_ADD);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $ownerUser */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $ownerUser */
$ownerUser = $this->createMock(IUser::class);
$ownerUser->expects($this->any())
->method('getUID')
->willReturn('937393');
- /** @var \PHPUnit_Framework_MockObject_MockObject $mount */
+ /** @var \PHPUnit\Framework\MockObject\MockObject $mount */
$mount = $this->createMock(ICachedMountFileInfo::class);
$mount->expects($this->any())
->method('getUser')
@@ -152,7 +152,7 @@ class ListenerTest extends TestCase {
->method('getUser')
->willReturn($ownerUser);
- /** @var \PHPUnit_Framework_MockObject_MockObject $activity */
+ /** @var \PHPUnit\Framework\MockObject\MockObject $activity */
$activity = $this->createMock(IEvent::class);
$activity->expects($this->exactly(count($al['users'])))
->method('setAffectedUser');
diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
index 3127cd3b9d0..103d21d76a3 100644
--- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
+++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
@@ -31,7 +31,7 @@ use OCP\Comments\ICommentsManager;
use Test\TestCase;
class CommentersSorterTest extends TestCase {
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
/** @var CommentersSorter */
protected $sorter;
diff --git a/apps/comments/tests/Unit/Controller/NotificationsTest.php b/apps/comments/tests/Unit/Controller/NotificationsTest.php
index cba183a9497..99cdd27a1c8 100644
--- a/apps/comments/tests/Unit/Controller/NotificationsTest.php
+++ b/apps/comments/tests/Unit/Controller/NotificationsTest.php
@@ -47,19 +47,19 @@ class NotificationsTest extends TestCase {
/** @var Notifications */
protected $notificationsController;
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $rootFolder;
- /** @var IUserSession|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserSession|\PHPUnit\Framework\MockObject\MockObject */
protected $session;
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
protected function setUp(): void {
diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php
index bb1d660af1e..daf638aa3d1 100644
--- a/apps/comments/tests/Unit/EventHandlerTest.php
+++ b/apps/comments/tests/Unit/EventHandlerTest.php
@@ -35,10 +35,10 @@ class EventHandlerTest extends TestCase {
/** @var EventHandler */
protected $eventHandler;
- /** @var ActivityListener|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ActivityListener|\PHPUnit\Framework\MockObject\MockObject */
protected $activityListener;
- /** @var NotificationListener|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var NotificationListener|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationListener;
protected function setUp(): void {
@@ -56,13 +56,13 @@ class EventHandlerTest extends TestCase {
}
public function testNotFiles() {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->once())
->method('getObjectType')
->willReturn('smiles');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
@@ -89,13 +89,13 @@ class EventHandlerTest extends TestCase {
* @param string $eventType
*/
public function testHandled($eventType) {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->once())
->method('getObjectType')
->willReturn('files');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/comments/tests/Unit/Notification/ListenerTest.php b/apps/comments/tests/Unit/Notification/ListenerTest.php
index 8fb717e4257..71380c06fec 100644
--- a/apps/comments/tests/Unit/Notification/ListenerTest.php
+++ b/apps/comments/tests/Unit/Notification/ListenerTest.php
@@ -36,13 +36,13 @@ use OCP\Notification\INotification;
use Test\TestCase;
class ListenerTest extends TestCase {
- /** @var IManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IManager|\PHPUnit\Framework\MockObject\MockObject */
protected $notificationManager;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $urlGenerator;
/** @var Listener */
@@ -75,7 +75,7 @@ class ListenerTest extends TestCase {
* @param string $notificationMethod
*/
public function testEvaluate($eventType, $notificationMethod) {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
->method('getObjectType')
@@ -97,7 +97,7 @@ class ListenerTest extends TestCase {
->method('getId')
->willReturn('1234');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
@@ -108,7 +108,7 @@ class ListenerTest extends TestCase {
->method(('getEvent'))
->willReturn($eventType);
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)->getMock();
$notification->expects($this->any())
->method($this->anything())
@@ -143,7 +143,7 @@ class ListenerTest extends TestCase {
* @param string $eventType
*/
public function testEvaluateNoMentions($eventType) {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
->method('getObjectType')
@@ -155,7 +155,7 @@ class ListenerTest extends TestCase {
->method('getMentions')
->willReturn([]);
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
@@ -180,7 +180,7 @@ class ListenerTest extends TestCase {
}
public function testEvaluateUserDoesNotExist() {
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject $comment */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
->method('getObjectType')
@@ -195,7 +195,7 @@ class ListenerTest extends TestCase {
->method('getId')
->willReturn('1234');
- /** @var CommentsEvent|\PHPUnit_Framework_MockObject_MockObject $event */
+ /** @var CommentsEvent|\PHPUnit\Framework\MockObject\MockObject $event */
$event = $this->getMockBuilder(CommentsEvent::class)
->disableOriginalConstructor()
->getMock();
@@ -206,7 +206,7 @@ class ListenerTest extends TestCase {
->method(('getEvent'))
->willReturn(CommentsEvent::EVENT_ADD);
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */
$notification = $this->getMockBuilder(INotification::class)->getMock();
$notification->expects($this->any())
->method($this->anything())
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php
index dbb79176320..4f400ae7ffe 100644
--- a/apps/comments/tests/Unit/Notification/NotifierTest.php
+++ b/apps/comments/tests/Unit/Notification/NotifierTest.php
@@ -46,21 +46,21 @@ class NotifierTest extends TestCase {
/** @var Notifier */
protected $notifier;
- /** @var IFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $l10nFactory;
- /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */
protected $l;
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
protected $folder;
- /** @var ICommentsManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ICommentsManager|\PHPUnit\Framework\MockObject\MockObject */
protected $commentsManager;
- /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
protected $url;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
- /** @var INotification|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var INotification|\PHPUnit\Framework\MockObject\MockObject */
protected $notification;
- /** @var IComment|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IComment|\PHPUnit\Framework\MockObject\MockObject */
protected $comment;
/** @var string */
protected $lc = 'tlh_KX';
@@ -98,15 +98,15 @@ class NotifierTest extends TestCase {
$displayName = 'Huraga';
$message = '@Huraga mentioned you in a comment on “Gre\'thor.odp”';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
->willReturn($displayName);
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $you */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $you */
$you = $this->createMock(IUser::class);
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node
->expects($this->atLeastOnce())
@@ -227,10 +227,10 @@ class NotifierTest extends TestCase {
$fileName = 'Gre\'thor.odp';
$message = 'You were mentioned on “Gre\'thor.odp”, in a comment by a user that has since been deleted';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $you */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $you */
$you = $this->createMock(IUser::class);
- /** @var Node|\PHPUnit_Framework_MockObject_MockObject $node */
+ /** @var Node|\PHPUnit\Framework\MockObject\MockObject $node */
$node = $this->createMock(Node::class);
$node
->expects($this->atLeastOnce())
@@ -342,7 +342,7 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareDifferentApp() {
$this->expectException(\InvalidArgumentException::class);
@@ -379,7 +379,7 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareNotFound() {
$this->expectException(\InvalidArgumentException::class);
@@ -417,13 +417,13 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareDifferentSubject() {
$this->expectException(\InvalidArgumentException::class);
$displayName = 'Huraga';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
@@ -480,13 +480,13 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareNotFiles() {
$this->expectException(\InvalidArgumentException::class);
$displayName = 'Huraga';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')
@@ -544,13 +544,13 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
-
+
public function testPrepareUnresolvableFileID() {
$this->expectException(\OCP\Notification\AlreadyProcessedException::class);
$displayName = 'Huraga';
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject $user */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject $user */
$user = $this->createMock(IUser::class);
$user->expects($this->once())
->method('getDisplayName')