summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/Controller/ShareControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/tests/Controller/ShareControllerTest.php')
-rw-r--r--apps/files_sharing/tests/Controller/ShareControllerTest.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/Controller/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php
index ea9bd8316e2..97e234ca22c 100644
--- a/apps/files_sharing/tests/Controller/ShareControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php
@@ -254,7 +254,12 @@ class ShareControllerTest extends \Test\TestCase {
$this->eventDispatcher->expects($this->once())
->method('dispatch')
- ->with('OCA\Files_Sharing::loadAdditionalScripts');
+ ->with(
+ 'OCA\Files_Sharing::loadAdditionalScripts',
+ $this->callback(function($event) use ($share) {
+ return $event->getArgument('share') === $share;
+ })
+ );
$this->l10n->expects($this->any())
->method('t')
@@ -374,7 +379,12 @@ class ShareControllerTest extends \Test\TestCase {
$this->eventDispatcher->expects($this->once())
->method('dispatch')
- ->with('OCA\Files_Sharing::loadAdditionalScripts');
+ ->with(
+ 'OCA\Files_Sharing::loadAdditionalScripts',
+ $this->callback(function($event) use ($share) {
+ return $event->getArgument('share') === $share;
+ })
+ );
$this->l10n->expects($this->any())
->method('t')