aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-08 16:53:51 +0200
committerCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-10-15 14:37:49 +0200
commit5b1cbaf583877a07fc3105c89f69ec64d5d89785 (patch)
treeeef80b5f86c7e006a0789e0f5c6b45b97e82c045 /apps
parent54905c39238c38dba04ba77d85b2349e76c0abd3 (diff)
downloadnextcloud-server-5b1cbaf583877a07fc3105c89f69ec64d5d89785.tar.gz
nextcloud-server-5b1cbaf583877a07fc3105c89f69ec64d5d89785.zip
fix(tests): Fix sharebymail testsbackport/48597/stable30
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php4
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index 556c7fafd6f..fd844128827 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -743,8 +743,8 @@ class ShareByMailProvider extends DefaultShareProvider implements IShareProvider
$qb = $this->dbConnection->getQueryBuilder();
$qb->update('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId())))
- ->set('item_source', $qb->createNamedParameter($share->getNode()->getId()))
- ->set('file_source', $qb->createNamedParameter($share->getNode()->getId()))
+ ->set('item_source', $qb->createNamedParameter($share->getNodeId()))
+ ->set('file_source', $qb->createNamedParameter($share->getNodeId()))
->set('share_with', $qb->createNamedParameter($share->getSharedWith()))
->set('permissions', $qb->createNamedParameter($share->getPermissions()))
->set('uid_owner', $qb->createNamedParameter($share->getShareOwner()))
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index e03fba72312..ae5d768b624 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -773,6 +773,8 @@ class ShareByMailProviderTest extends TestCase {
$this->share->expects($this->once())->method('getSharedBy')->willReturn($sharedBy);
$this->share->expects($this->any())->method('getNote')->willReturn($note);
$this->share->expects($this->atLeastOnce())->method('getId')->willReturn($id);
+ $this->share->expects($this->atLeastOnce())->method('getNodeId')->willReturn($itemSource);
+ $this->share->expects($this->once())->method('getSharedWith')->willReturn($shareWith);
$this->assertSame($this->share,
$instance->update($this->share)