aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-01-23 10:25:06 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-02-07 11:23:29 +0100
commit0f8c34cdc65046d68339127849724ea6383aa4a8 (patch)
treed1b662bec2d2d58da396eaa8b21071f7ec5c698c /tests/lib/Files
parent255f230a875d947b81487f9316c03bac606e7ce0 (diff)
downloadnextcloud-server-0f8c34cdc65046d68339127849724ea6383aa4a8.tar.gz
nextcloud-server-0f8c34cdc65046d68339127849724ea6383aa4a8.zip
Fix filesize return type error in ViewTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r--tests/lib/Files/ViewTest.php20
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index 2189e7c09f4..f2195810bb7 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -1798,7 +1798,18 @@ class ViewTest extends \Test\TestCase {
['is_file', ['dir'], 'dir', null],
['stat', ['dir'], 'dir', null],
['filetype', ['dir'], 'dir', null],
- ['filesize', ['dir'], 'dir', null],
+ [
+ 'filesize',
+ ['dir'],
+ 'dir',
+ null,
+ ILockingProvider::LOCK_SHARED,
+ ILockingProvider::LOCK_SHARED,
+ ILockingProvider::LOCK_SHARED,
+ null,
+ /* Return an int */
+ 100
+ ],
['isCreatable', ['dir'], 'dir', null],
['isReadable', ['dir'], 'dir', null],
['isUpdatable', ['dir'], 'dir', null],
@@ -1832,7 +1843,8 @@ class ViewTest extends \Test\TestCase {
$expectedLockBefore = ILockingProvider::LOCK_SHARED,
$expectedLockDuring = ILockingProvider::LOCK_SHARED,
$expectedLockAfter = ILockingProvider::LOCK_SHARED,
- $expectedStrayLock = null
+ $expectedStrayLock = null,
+ $returnValue = true,
) {
$view = new View('/' . $this->user . '/files/');
@@ -1853,10 +1865,10 @@ class ViewTest extends \Test\TestCase {
$storage->expects($this->once())
->method($operation)
->willReturnCallback(
- function () use ($view, $lockedPath, &$lockTypeDuring) {
+ function () use ($view, $lockedPath, &$lockTypeDuring, $returnValue) {
$lockTypeDuring = $this->getFileLockType($view, $lockedPath);
- return true;
+ return $returnValue;
}
);