From 107b418815ebb0a0787c823b1fa5ae70a4f00586 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 13 Sep 2016 14:09:34 +0200 Subject: [PATCH] Fix MissingMandatoryParametersException for share notifications The routing system is non-forgiving --- lib/private/Share/MailNotifications.php | 2 +- tests/lib/Share/MailNotificationsTest.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/private/Share/MailNotifications.php b/lib/private/Share/MailNotifications.php index aaecd5353e5..3d4301a2bdd 100644 --- a/lib/private/Share/MailNotifications.php +++ b/lib/private/Share/MailNotifications.php @@ -123,7 +123,7 @@ class MailNotifications { $link = $this->urlGenerator->linkToRouteAbsolute( 'files.viewcontroller.showFile', - ['fileId' => $items[0]['item_source']] + ['fileid' => $items[0]['item_source']] ); list($htmlBody, $textBody) = $this->createMailBody($filename, $link, $expiration, 'internal'); diff --git a/tests/lib/Share/MailNotificationsTest.php b/tests/lib/Share/MailNotificationsTest.php index 0c951d11f88..d1c2a17cb9e 100644 --- a/tests/lib/Share/MailNotificationsTest.php +++ b/tests/lib/Share/MailNotificationsTest.php @@ -241,10 +241,8 @@ class MailNotificationsTest extends \Test\TestCase { $this->urlGenerator->expects($this->once()) ->method('linkToRouteAbsolute') ->with( - $this->equalTo('files.viewcontroller.showFile'), - $this->equalTo([ - 'fileId' => 123, - ]) + 'files.viewcontroller.showFile', + ['fileid' => 123] ); $recipientList = [$recipient]; -- 2.39.5