diff options
author | Robin Appelman <robin@icewind.nl> | 2024-02-09 09:54:52 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-03-04 13:57:31 +0100 |
commit | e7a7b4a40184dc3da2c83e858c820625f660e48e (patch) | |
tree | 367bda0ac814376e7c771fbe4b1c40cf7f33df53 /tests/lib/Share20/ManagerTest.php | |
parent | 4d110c1dd6ae384c00c93b4e266118004b71e498 (diff) | |
download | nextcloud-server-e7a7b4a40184dc3da2c83e858c820625f660e48e.tar.gz nextcloud-server-e7a7b4a40184dc3da2c83e858c820625f660e48e.zip |
perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Share20/ManagerTest.php')
-rw-r--r-- | tests/lib/Share20/ManagerTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index 25c011825da..049450133dd 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -795,9 +795,9 @@ class ManagerTest extends \Test\TestCase { ->willReturn(42); // Id 108 is used in the data to refer to the node of the share. $userFolder->expects($this->any()) - ->method('getById') + ->method('getFirstNodeById') ->with(108) - ->willReturn([$share->getNode()]); + ->willReturn($share->getNode()); $userFolder->expects($this->any()) ->method('getRelativePath') ->willReturnArgument(0); @@ -4464,9 +4464,9 @@ class ManagerTest extends \Test\TestCase { ->willReturn($userFolder); $folder->method('getPath') ->willReturn('/owner/files/folder'); - $userFolder->method('getById') + $userFolder->method('getFirstNodeById') ->with($this->equalTo(42)) - ->willReturn([12 => $file]); + ->willReturn($file); $userFolder->method('getPath') ->willReturn('/user1/files'); @@ -4583,9 +4583,9 @@ class ManagerTest extends \Test\TestCase { ->willReturn($userFolder); $folder->method('getPath') ->willReturn('/owner/files/folder'); - $userFolder->method('getById') + $userFolder->method('getFirstNodeById') ->with($this->equalTo(42)) - ->willReturn([42 => $file]); + ->willReturn($file); $userFolder->method('getPath') ->willReturn('/user1/files'); |