nextcloud-server/tests/lib
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +07:00
..
app The constant is now deprecated 2015-10-14 15:29:38 +07:00
appframework Remove dependency on ICrypto + use XOR 2015-10-21 17:33:41 +07:00
archive
backgroundjob handle non existing job classes in $jobList->getNext 2015-08-19 14:16:05 +07:00
cache Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
command
contacts
db Allow `set('column', 'null')` to work like in Doctrine 2015-09-24 09:53:09 +07:00
encryption only check if the user exists if a user was added as parameter 2015-09-24 12:21:40 +07:00
files Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +07:00
group
hooks
http/client
lock expire old lock rows 2015-09-17 13:55:04 +07:00
mail Run test only when idn is available 2015-10-16 11:02:10 +07:00
memcache Fallback to complete Memcached flush if getAllKeys fails 2015-09-05 20:02:49 +07:00
notification Move interfaces to private until they are no longer experimental 2015-09-08 09:01:02 +07:00
ocs
preview Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
public
repair Do not update mime types for folders with extension 2015-10-09 18:16:36 +07:00
security don't read certificates if ownCloud is not installed 2015-08-30 19:00:03 +07:00
session Write to session in batch at the end of the request 2015-09-09 12:48:37 +07:00
share Check for error when resharing 2015-10-16 20:43:17 +07:00
template
traits Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
user Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
util/user Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
activitymanager.php Add test coverage for Activity Event and Manager 2015-08-20 10:25:49 +07:00
allconfig.php
api.php Merge pull request #18184 from owncloud/ocs-merge-headers 2015-10-21 10:36:37 +07:00
app.php
appconfig.php Only check the "was updated/inserted" when not on Oracle... 2015-09-14 15:27:06 +07:00
archive.php
autoloader.php verify the path in the autoloader 2015-09-01 15:03:28 +07:00
avatar.php
cache.php
capabilitiesmanager.php Use DI 2015-08-10 10:45:16 +07:00
configtests.php rename config test to prevent autoloader issue 2015-09-28 10:47:49 +07:00
contactsmanager.php
datetimeformatter.php
db.php
dbschema.php
errorHandler.php
files.php
group.php Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
helper.php
helperstorage.php
hookhelper.php
httphelper.php
image.php
installer.php
l10n.php [l10n] remove unused static methods 2015-10-02 12:51:45 +07:00
largefilehelper.php
largefilehelpergetfilesize.php
logger.php Remove passwords from logged exception stack traces 2015-09-24 20:01:30 +07:00
naturalsort.php
navigationmanagertest.php
ocsclienttest.php
preview.php Add tests 2015-10-01 13:17:22 +07:00
repair.php
server.php Move interfaces to private until they are no longer experimental 2015-09-08 09:01:02 +07:00
setup.php
streamwrappers.php
subadmin.php New \OC\SubAdmin class 2015-10-21 11:32:38 +07:00
tags.php
template.php verify the path in the autoloader 2015-09-01 15:03:28 +07:00
tempmanager.php Unit test getting temp dir from config 2015-08-30 23:34:38 +07:00
testcase.php Clear the shares after the test like storages and files 2015-10-05 10:13:45 +07:00
testmoveablemountpoint.php
updater.php Always pass in ILogger 2015-10-09 14:08:22 +07:00
urlgenerator.php
user.php Move dummy backend to Tests namespace 2015-09-22 11:01:11 +07:00
util.php Remove dependency on ICrypto + use XOR 2015-10-21 17:33:41 +07:00
utilcheckserver.php