summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification
diff options
context:
space:
mode:
Diffstat (limited to 'apps/updatenotification')
-rw-r--r--apps/updatenotification/tests/Notification/NotifierTest.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php
index b1ddf7b478d..f97ff776c93 100644
--- a/apps/updatenotification/tests/Notification/NotifierTest.php
+++ b/apps/updatenotification/tests/Notification/NotifierTest.php
@@ -30,6 +30,7 @@ use OCP\IGroupManager;
use OCP\IURLGenerator;
use OCP\IUserSession;
use OCP\L10N\IFactory;
+use OCP\Notification\AlreadyProcessedException;
use OCP\Notification\IManager;
use OCP\Notification\INotification;
use Test\TestCase;
@@ -112,21 +113,12 @@ class NotifierTest extends TestCase {
->method('getObjectId')
->willReturn($versionNotification);
- if ($exception) {
- $this->notificationManager->expects($this->once())
- ->method('markProcessed')
- ->with($notification);
- } else {
- $this->notificationManager->expects($this->never())
- ->method('markProcessed');
- }
-
try {
self::invokePrivate($notifier, 'updateAlreadyInstalledCheck', [$notification, $versionInstalled]);
$this->assertFalse($exception);
} catch (\Exception $e) {
$this->assertTrue($exception);
- $this->assertInstanceOf('InvalidArgumentException', $e);
+ $this->assertInstanceOf(AlreadyProcessedException::class, $e);
}
}
}