aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-10-08 16:53:51 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-10-08 15:34:22 +0000
commitebafd49bc38a790602881cf62f0ec0c31dd61a46 (patch)
tree0f340872ec50c8e5457f03e2b76ac5259a311ee2
parent7f7e2a652464e5715c4ece5478e22dc383d2271d (diff)
downloadnextcloud-server-backport/48597/stable29.tar.gz
nextcloud-server-backport/48597/stable29.zip
fix(tests): Fix sharebymail testsbackport/48597/stable29
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-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 9b7dfe48dcb..f05dae9752a 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -678,8 +678,8 @@ class ShareByMailProvider 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 1f9034950b7..988d6d8630f 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -643,6 +643,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)