summaryrefslogtreecommitdiffstats
path: root/apps/comments/tests/Unit/Notification
diff options
context:
space:
mode:
Diffstat (limited to 'apps/comments/tests/Unit/Notification')
-rw-r--r--apps/comments/tests/Unit/Notification/ListenerTest.php22
-rw-r--r--apps/comments/tests/Unit/Notification/NotifierTest.php42
2 files changed, 32 insertions, 32 deletions
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')