Robin Appelman
34d5a103b4
test: adjust tests to getPath changes
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 months ago
Robin Appelman
aa15f9d16d
chore: run rector
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 months ago
Ferdinand Thiessen
5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
# Conflicts:
# apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
6 months ago
Robin Appelman
3561937816
chore: run rector on tests with new rule
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 months ago
Robin Appelman
29e39c0a2e
chore: run rector on tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 months ago
Côme Chilliet
0243d23b8c
fix(tests): Remove calls to removed getMountProviderCollection from tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
7 months ago
Côme Chilliet
e35a8ed063
fix(tests): Disable encryption wrapper when it makes sense
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
21233b7e17
fix(tests): Remove Encryption disabling in ViewTest to avoid side effects
Adapt tests a bit to make them pass with Encryption wrapper registered
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet
38f341c179
fix(tests): Unregister encryption modules in ViewTest to avoid side effects
It was clearing the hooks with the same results before
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Joas Schilling
c24f5fb256
test: Finish migrating tests/Core/ to PHPUnit 10 compatible code
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 months ago
Côme Chilliet
0cf4f3cc71
fix: Replace all usages of OC_User backend method calls by IUserManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
9 months ago
Robin Appelman
16d0363937
fix: improve checks for moving shares/storages into other mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Louis Chemineau
425e0c3660
test(View): Copy preserves content
Signed-off-by: Louis Chemineau <louis@chmn.me>
1 year ago
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>
1 year ago
provokateurin
f28e74b7a8
refactor(Storage): Make all parameter types strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
1 year ago
provokateurin
256a8d8903
test: Fix IStorage return types
Signed-off-by: provokateurin <kate@provokateurin.de>
1 year ago
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>
1 year ago
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>
1 year ago
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
1 year ago
Christoph Wurst
49dd79eabb
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 year ago
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
1 year ago
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 year ago
provokateurin
ebfbe99652
fix(files): Create non-existent parents of mountpoints
Signed-off-by: provokateurin <kate@provokateurin.de>
1 year ago
Andy Scherzinger
1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2 years ago
Andrew Summers
45eb4a839d
Refactor `OC\Server::getLockingProvider`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2 years ago
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>
2 years ago
John Molakvoæ (skjnldsv)
f828dce597
Fix sharing creation insert and get
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
5 years ago
Andrew Summers
6b09a79227
Refactor `OC\Server::getShareManager`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2 years ago
Robin Appelman
b6c3507aa0
only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
e73889a240
cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Côme Chilliet
ee756579a7
Fix setting static property in tests on PHP 8.3
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
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>
3 years ago
Côme Chilliet
966a3e6963
Tidy up typing in OC\Files\View
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Robin Appelman
9f3dbb699a
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
3 years ago
Côme Chilliet
0f8c34cdc6
Fix filesize return type error in ViewTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
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>
3 years ago
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>
4 years ago
Côme Chilliet
6a1510f8ee
Remove some more at matchers in tests/lib
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Robin Appelman
1c468129af
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 years ago
Côme Chilliet
e053feb5db
Fix PHP deprecation warning in File/ViewTest
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
4 years ago
Julius Härtl
98560c80ea
Properly handle result when copying with failure and throw in tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
5 years ago
Julius Härtl
ee842f1c43
Fix writeStream mocking
Signed-off-by: Julius Härtl <jus@bitgrid.net>
5 years ago
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>
5 years ago
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>
5 years ago
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>
6 years ago
Robin Appelman
fcad692b4a
rollback cache rename if trashbin move fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
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>
6 years ago
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
6 years ago
Robin Appelman
f984512e33
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 years ago