From 7f0b2738bf6e7837a731fc60866d5dbbd763d1ce Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Mon, 30 Nov 2020 12:24:23 +0100
Subject: [PATCH] Fix notifier test

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
---
 apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
index 3718f1bde46..b4f5d7dea9e 100644
--- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
+++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php
@@ -63,6 +63,9 @@ class NotifierTest extends TestCase {
 		$this->l10n->expects($this->any())
 			->method('t')
 			->willReturnCallback(function ($string, $args) {
+				if (!is_array($args)) {
+					$args = [$args];
+				}
 				return vsprintf($string, $args);
 			});
 		$this->l10n->expects($this->any())
@@ -103,7 +106,7 @@ class NotifierTest extends TestCase {
 		$this->assertEquals($this->notifier->getName(), 'Calendar');
 	}
 
-	
+
 	public function testPrepareWrongApp(): void {
 		$this->expectException(\InvalidArgumentException::class);
 		$this->expectExceptionMessage('Notification not from this app');
@@ -120,7 +123,7 @@ class NotifierTest extends TestCase {
 		$this->notifier->prepare($notification, 'en');
 	}
 
-	
+
 	public function testPrepareWrongSubject() {
 		$this->expectException(\InvalidArgumentException::class);
 		$this->expectExceptionMessage('Unknown subject');
-- 
GitLab