Côme Chilliet
ae080bf8d8
fix(tests): Fix fopen in mock returning null which is not a valid return
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-08-26 08:42:58 +07:00
Robin Appelman
16d0363937
fix: improve checks for moving shares/storages into other mounts
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-01-03 15:36:32 +07:00
Louis Chemineau
425e0c3660
test(View): Copy preserves content
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-12-03 18:29:32 +07:00
Louis Chemineau
199b0bd4d9
fix(files): Correctly copy the cache information on copy operations
...
Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder.
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-12-03 17:04:44 +07:00
provokateurin
f28e74b7a8
refactor(Storage): Make all parameter types strong types
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 15:00:05 +07:00
provokateurin
256a8d8903
test: Fix IStorage return types
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 17:29:48 +07:00
Côme Chilliet
4adf5fd5b0
fix(tests): Pause trashbin for lock tests in ViewTest using rmdir and unlink
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-24 10:37:38 +07:00
Côme Chilliet
b8ab560bdd
fix(tests): Fix test to remove call to non-existing constructor
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-23 14:50:43 +07:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2024-09-15 22:32:31 +07:00
Git'Fellow
0308001118
fix(files): Check if the target path is a descendant of the shared folder path
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
fix: tests
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
fix: fix tests
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
fix: add tests
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
fix: tests
2024-09-05 23:54:01 +07:00
Kate
09fef8f0ec
Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parents
2024-09-04 20:00:24 +07:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
provokateurin
ebfbe99652
fix(files): Create non-existent parents of mountpoints
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-08-22 12:04:31 +07:00
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
John Molakvoæ
5a1ed2d9ea
Merge pull request #40131 from summersab/refactor/OC-Server-getShareManager
2024-03-15 16:05:59 +07:00
Andrew Summers
45eb4a839d
Refactor `OC\Server::getLockingProvider`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:11:33 +07:00
John Molakvoæ
9338ef36de
Merge branch 'master' into refactor/OC-Server-getShareManager
...
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-03-15 13:03:34 +07:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Robin Appelman
64f62f7cfd
Merge pull request #39863 from nextcloud/sharing-mask-wrapper
...
move share permission logic to storage wrapper
2023-09-04 14:05:14 +07:00
John Molakvoæ (skjnldsv)
f828dce597
Fix sharing creation insert and get
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2023-09-02 10:25:24 +07:00
Andrew Summers
6b09a79227
Refactor `OC\Server::getShareManager`
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2023-08-29 21:32:58 +07:00
Robin Appelman
b6c3507aa0
only determine quota_include_external_storage once for quota wrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-18 14:25:28 +07:00
Robin Appelman
e73889a240
cleanup di for share permissions wrapper
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-16 15:25:05 +07:00
Côme Chilliet
ee756579a7
Fix setting static property in tests on PHP 8.3
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-08-14 16:27:56 +07:00
Côme Chilliet
4393b96542
Remove unused method getLocalFolder
...
It’s not used and not in any OCP interface/class.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:34 +07:00
Côme Chilliet
966a3e6963
Tidy up typing in OC\Files\View
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:33 +07:00
Julius Härtl
08802ad13f
Merge pull request #36566 from nextcloud/mount-find-by-numeric-id
2023-02-08 20:04:57 +07:00
Robin Appelman
9f3dbb699a
fix tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-07 15:50:10 +07:00
Côme Chilliet
0f8c34cdc6
Fix filesize return type error in ViewTest
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +07:00
Robin Appelman
1de0b10751
add test for trying to fopen a file which no longer exists on disk
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-29 10:27:32 +07:00
Carl Schwan
d5c23dbb9f
Move CappedMemoryCache to OCP
...
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +07:00
Côme Chilliet
6a1510f8ee
Remove some more at matchers in tests/lib
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-20 10:53:06 +07:00
Robin Appelman
1c468129af
adjust tests to new fs setup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:59 +07:00
Côme Chilliet
e053feb5db
Fix PHP deprecation warning in File/ViewTest
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:43:32 +07:00
Julius Härtl
98560c80ea
Properly handle result when copying with failure and throw in tests
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 09:20:35 +07:00
Julius Härtl
ee842f1c43
Fix writeStream mocking
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2021-01-05 09:20:35 +07:00
Morris Jobke
83a75c670b
Replace static call to Share::unshare with ShareManager->deleteShare in tests
...
And then cleanup all the code that is dead then...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-11-30 09:51:18 +07:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +07:00
Robin Appelman
ad7798f9c9
use exceptions for error signaling in writeStream
...
this remove the ambiguity when writing zero length files
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-23 15:24:52 +07:00
Robin Appelman
fcad692b4a
rollback cache rename if trashbin move fails
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-23 15:24:48 +07:00
Joas Schilling
89ed2c37bf
Update share type constant usage
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Robin Appelman
f984512e33
fix tests
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-01 14:17:31 +07:00
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +07:00
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +07:00
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +07:00
Arthur Schiwon
fc16b09a2c
Files first to use own GenericEvent
...
* those are added to 18 only anyway :)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-26 14:48:59 +07:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +07:00