diff options
-rw-r--r-- | apps/comments/tests/Unit/Notification/NotifierTest.php | 26 | ||||
-rw-r--r-- | apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php | 8 |
2 files changed, 10 insertions, 24 deletions
diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index ecd22ffd9e3..9281bb99fe8 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -35,7 +35,6 @@ use OCP\Files\IRootFolder; use OCP\Files\Node; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\IUser; use OCP\IUserManager; use OCP\L10N\IFactory; use OCP\Notification\INotification; @@ -43,7 +42,6 @@ use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class NotifierTest extends TestCase { - /** @var Notifier */ protected $notifier; /** @var IFactory|MockObject */ @@ -135,10 +133,8 @@ class NotifierTest extends TestCase { ->method('getSubjectParameters') ->willReturn(['files', '678']); $this->notification - ->expects($this->once()) - ->method('setParsedSubject') - ->with($message) - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedSubject'); $this->notification ->expects($this->once()) ->method('setRichSubject') @@ -150,10 +146,8 @@ class NotifierTest extends TestCase { ->with('Hi {mention-user1}!', ['mention-user1' => ['type' => 'user', 'id' => 'you', 'name' => 'Your name']]) ->willReturnSelf(); $this->notification - ->expects($this->once()) - ->method('setParsedMessage') - ->with('Hi @Your name!') - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedMessage'); $this->notification ->expects($this->once()) ->method('setIcon') @@ -256,10 +250,8 @@ class NotifierTest extends TestCase { ->method('getSubjectParameters') ->willReturn(['files', '678']); $this->notification - ->expects($this->once()) - ->method('setParsedSubject') - ->with($message) - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedSubject'); $this->notification ->expects($this->once()) ->method('setRichSubject') @@ -271,10 +263,8 @@ class NotifierTest extends TestCase { ->with('Hi {mention-user1}!', ['mention-user1' => ['type' => 'user', 'id' => 'you', 'name' => 'Your name']]) ->willReturnSelf(); $this->notification - ->expects($this->once()) - ->method('setParsedMessage') - ->with('Hi @Your name!') - ->willReturnSelf(); + ->expects($this->never()) + ->method('setParsedMessage'); $this->notification ->expects($this->once()) ->method('setIcon') diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php index 9e1e02189f5..e4622336d74 100644 --- a/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php +++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/BaseTest.php @@ -32,13 +32,11 @@ use OCP\Activity\IProvider; use OCP\IGroupManager; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\IUser; use OCP\IUserManager; use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class BaseTest extends TestCase { - /** @var IUserManager|MockObject */ protected $userManager; @@ -85,10 +83,8 @@ class BaseTest extends TestCase { ->method('setRichSubject') ->with($subject, $parameters) ->willReturnSelf(); - $event->expects($this->once()) - ->method('setParsedSubject') - ->with($parsedSubject) - ->willReturnSelf(); + $event->expects($this->never()) + ->method('setParsedSubject'); $this->invokePrivate($this->provider, 'setSubjects', [$event, $subject, $parameters]); } |