]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix MissingMandatoryParametersException for share notifications 1394/head
authorJoas Schilling <coding@schilljs.com>
Tue, 13 Sep 2016 12:09:34 +0000 (14:09 +0200)
committerJoas Schilling <coding@schilljs.com>
Tue, 13 Sep 2016 12:09:34 +0000 (14:09 +0200)
The routing system is non-forgiving

lib/private/Share/MailNotifications.php
tests/lib/Share/MailNotificationsTest.php

index aaecd5353e5930bb33b24e2809e1f299d8dcece9..3d4301a2bdd570b31f4fe9adf114081db1875c2b 100644 (file)
@@ -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');
index 0c951d11f88e8d4a85605a234393ddd54e0375da..d1c2a17cb9ede13f0074b40e33ee20c3b148b448 100644 (file)
@@ -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];