Joas Schilling
572ea18ac7
fix: Fix linkToOCSRouteAbsolute() without index.php and subfolder
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 months ago
John Molakvoæ
998b3a2581
feat(f2v): migrate Files
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
10 months ago
Côme Chilliet
8d5165e8dc
Adapt tests to config value typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Christopher Ng
4f8e916585
Add label for logo link
Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 year ago
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Vincent Petry
42d9e087fb
Remove unused legacy ajax/list.php in files app
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 year ago
Carl Schwan
458c2fa297
Remove OCP\App and OCP\BackgroundJob
Both deprecated since NC 23
IAppManager is the replacement for OCP\App unfortunately it can't be
dependency injected in classes used by the installed otherwise the
database connection is initialised too early
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Jonas Meurer
7c76e85dde
Use IURLGenerator function to get value of `\OC::$WEBROOT` global
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2 years ago
Daniel Rudolf
a1d6189dfa
Fix UrlGeneratorTest
And again... :unamused:
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2 years ago
Daniel Rudolf
b768cade2b
Fix UrlGeneratorTest
Again... :unamused:
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2 years ago
Daniel Rudolf
1e5962ae98
Fix UrlGeneratorTest::testGetDefaultPageUrlWithDefaultApps()
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
3 years ago
Daniel Rudolf
15a445f743
Move UtilTest::testDefaultApps() to UrlGeneratorTest
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
3 years ago
Daniel Rudolf
12059eb65b
Add IUrlGenerator::linkToDefaultPageUrl()
Replaces the deprecated \OC_Util::getDefaultPageUrl() and makes this API public.
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
3 years ago
Roeland Jago Douma
72a9c35be3
Remove some IRouter methods
This is not the end. IRouter needs to burn.
But it is a start.
🎵 we didn't start the fire 🎵
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Morris Jobke
387cac4c5f
Properly inject IRouter into URLGenerator to properly encapsulate tests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Morris Jobke
053ee7b386
Only load routes of the app which is requested
* Add fallback to load all routes if needed
* Move partial loaded routes test to proper place
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>
3 years ago
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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>
4 years ago
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Joas Schilling
b8fcf6e9b3
Allow empty strings in getAbsoluteURL
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Joas Schilling
2b18b9ae96
Update the URLGenerator test to current state of art
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 years ago
Roeland Jago Douma
c97b4274cc
Add function to generate urls for OCS routes
fixes #11617
The OCS routes are only absolute for now as they are often exposed to
the outside anyway and are on a different endpoint than index.php in
anyway.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
John Molakvoæ (skjnldsv)
c0c4443ffc
Fixed tests
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
Julius Härtl
f039ba7480
Add tests and inject IRequest
Signed-off-by: Julius Härtl <jus@bitgrid.net>
7 years ago
Roeland Jago Douma
2164085f22
Fix urlgenerator test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Roeland Jago Douma
478b86e5e5
Fix getMock UrlGeneratortest
7 years ago
Joas Schilling
9a4253ef7c
Fix lib/
8 years ago
Thomas Müller
f9fc254672
Add DB group to some files_external tests
Adding group Db to federation tests and ldap tests
Add group DB to Test_UrlGenerator
Adding group DB to trashbin and versions tests
Adding group DB to Test_Util_CheckServer for pg
8 years ago
Lukas Reschke
daa388ce8d
Move index.php from files to AppFramework
1. Allows it to use the more secure CSP rules of the AppFramework.
2. Adds some unit tests.
8 years ago
Lukas Reschke
9e2ebf2dce
Cache \OC\URLGenerator::imagePath
\OC\URLGenerator::imagePath is a really expensive operation due to all the I/O handling and can really benefit from caching.
9 years ago
Joas Schilling
cb3a598cdb
Make root tests extend the \Test\TestCase
9 years ago
Lukas Reschke
3ad9489634
Add unit test
This unit test is shitty but at least it works...
9 years ago
Morris Jobke
dc36d30953
Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
10 years ago
Thomas Tanghus
df9d9ac958
Remove unused var
10 years ago
Thomas Tanghus
dd36d4b894
Add tests for linkTo, linkToPublic, linkToRemote, linkToRemoteBase
10 years ago
Thomas Tanghus
ada8d4e0c9
Fix unit tests
10 years ago
Bjoern Schiessle
1ae6e9ec21
add unit test for \OC\URLGenerator::getAbsoluteURL to verify #6935
10 years ago