nextcloud/tests/lib/files
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 +01:00
..
cache Add tests for double cache rename 2015-10-16 21:41:51 +02:00
mount Revert "Fix mounting wrapped storages resulting in many-layered wrapping" 2015-08-19 14:41:43 +01:00
node Add unit test for searching in storage root 2015-10-06 15:54:17 +02:00
objectstore Skip checkupdate test for swift 2015-10-16 21:41:51 +02:00
storage versions should always use the keys of the original file, no need to create new one 2015-10-01 10:10:19 +02:00
stream occ script to disable encryption and to decrypt all files again 2015-09-15 22:39:44 +02:00
type Move mimetype files into /resources/config/ 2015-09-22 16:43:28 +02:00
utils Move dummy backend to Tests namespace 2015-09-22 11:01:11 +02:00
etagtest.php Move dummy backend to Tests namespace 2015-09-22 11:01:11 +02:00
filesystem.php adjust filesystem tests to objectstore 2015-10-09 12:35:37 +02:00
pathverificationtest.php Add more unit tests 2015-07-30 11:25:05 +02:00
view.php Throw exception on `getPath` if file does not exist 2015-10-25 17:58:21 +01:00