aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core
Commit message (Collapse)AuthorAgeFilesLines
* Fixes testcase error.Faraz Samapoor2023-06-241-1/+6
| | | | Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* fix(tests): Adjust unit testsJoas Schilling2023-05-151-8/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Adjust console formatter code to match with Symfony type hintsFerdinand Thiessen2023-04-172-0/+2
| | | | | | | Symfony has added type hints on the `OutputFormatterInterface`, so we must adjust our type hints to match with Symfony. Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
* Add some tests for input trimming in LostController.phpJoshua Trees2023-04-051-0/+36
| | | | Signed-off-by: Joshua Trees <me@jtrees.io>
* Fix testsGit'Fellow2023-03-281-25/+4
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #36489 from ↵Joas Schilling2023-02-061-0/+1
|\ | | | | | | | | nextcloud/bugfix/noid/brute-force-protection-password-reset Add bruteforce protection to password reset page
| * fix(CI): Adjust expected resultJoas Schilling2023-02-061-0/+1
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | fix(client-login-flow): Handle missing stateToken gracefullyChristoph Wurst2023-02-061-0/+6
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix tests failures (number of calls differed with last rebase)Côme Chilliet2023-01-241-15/+15
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix a bunch of deprecation in the phpunit for coreCarl Schwan2023-01-246-52/+51
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix broken user:setting command unit testJoas Schilling2023-01-231-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* composer run cs:fixCôme Chilliet2023-01-2035-37/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(app framework)!: Inject services into controller methodsChristoph Wurst2023-01-181-20/+17
| | | | | | | | | | | | | | | Usually Nextcloud DI goes through constructor injection. This has the implication that each instance of a class builds the full DI tree. That is the injected services, their services, etc. Occasionally there is a service that is only needed for one controller method. Then the DI tree is build regardless if used or not. If services are injected into the method, we only build the DI tree if that method gets executed. This is also how Laravel allows injection. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix login loop if login CSRF fails and user is not logged inChristoph Wurst2023-01-181-10/+11
| | | | | | | | | | If CSRF fails but the user is logged in that they probably logged in in another tab. This is fine. We can just redirect. If CSRF fails and the user is also not logged in then something is fishy. E.g. because Nextcloud contantly regenrates the session and the CSRF token and the user is stuck in an endless login loop. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Make the LoginController strictChristoph Wurst2022-12-151-4/+17
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Check share attributes on preview endpointsJulius Härtl2022-10-251-0/+9
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix LostController testCôme Chilliet2022-10-181-2/+7
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix unit testsJoas Schilling2022-08-311-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix Controller testsArthur Schiwon2022-07-222-8/+13
| | | | | | | | - added pageTitle in code was missing in expectations - fixed warnings of superflouos parameter - fixed wrong type of mock Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Make LostController use IInitialState and LoggerInterfaceThomas Citharel2022-06-101-6/+18
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Modernize the LostControllerTest testThomas Citharel2022-06-101-33/+25
| | | | | | Remove some depreciated at() calls Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Add password reset typed eventsThomas Citharel2022-06-101-12/+32
| | | | | | These hooks are only used in the Encryption app from what I can see. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Update core to PHP 7.4 standardCarl Schwan2022-05-208-41/+30
| | | | | | | - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #32375 from ↵Joas Schilling2022-05-162-33/+50
|\ | | | | | | | | nextcloud/bugfix/noid/show-user-account-on-grant-loginflow-step Show user account on grant loginflow step
| * Extend testsJoas Schilling2022-05-162-33/+50
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Modernize contacts menuThomas Citharel2022-05-121-9/+6
|/ | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Remove old legacy SvgController and IconsCacherJohn Molakvoæ2022-05-101-198/+0
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Do not dispatch postSetPassword when setPassword failsLouis Chemineau2022-05-051-0/+6
| | | | | | Also Improve error message when setPassword fails Signed-off-by: Louis Chemineau <louis@chmn.me>
* Expose shareWithDisplayNameUnique also on autocomplete endpointJoas Schilling2022-05-031-9/+30
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* PhpunitJohn Molakvoæ2022-04-211-3/+3
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Merge pull request #31592 from nextcloud/fix/direct-arg-flow-v2Vincent Petry2022-03-291-0/+2
|\ | | | | Add direct arg to login flow
| * Add direct arg to login flowVincent Petry2022-03-281-0/+2
| | | | | | | | | | Signed-off-by: Vincent Petry <vincent@nextcloud.com> Co-Authored-by: Carl Schwan <carl@carlschwan.eu>
* | Fix testsJoas Schilling2022-02-231-11/+12
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only allow avatars in 64 and 512 pixel sizeJoas Schilling2022-02-072-12/+52
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Pass username prefill through unauthenticated request redirectsJulius Härtl2021-12-291-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix tests and avoid PHP errors in themCôme Chilliet2021-11-238-5/+34
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix missing import of ILoggerJoas Schilling2021-11-021-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* add check isFairUseOfFreePushService on loginVitor Mattos2021-10-231-7/+25
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Merge pull request #27733 from ↵Julius Härtl2021-10-052-14/+25
|\ | | | | | | PhrozenByte/enhancement/noid/IURLGenerator-linkToDefaultPageUrl
| * Merge branch 'master' into enhancement/noid/IURLGenerator-linkToDefaultPageUrlDaniel Rudolf2021-08-041-1/+1
| |\
| * | Deprecate RedirectToDefaultAppResponseDaniel Rudolf2021-07-012-9/+21
| | | | | | | | | | | | Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
| * | Remove unused importsDaniel Rudolf2021-06-301-1/+0
| | | | | | | | | | | | Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
| * | Add IUrlGenerator::linkToDefaultPageUrl()Daniel Rudolf2021-06-302-10/+10
| | | | | | | | | | | | | | | | | | Replaces the deprecated \OC_Util::getDefaultPageUrl() and makes this API public. Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
* | | Make AppsEnableTest and AppsDisableTest independet of the app version numberDaniel Kesselberg2021-10-012-22/+22
| | | | | | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | | Fix unit testsJoas Schilling2021-09-292-16/+16
| | | | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | | fixes missing prefix to validate password reset tokenArthur Schiwon2021-09-101-2/+5
| | | | | | | | | | | | | | | | | | - also fixes the test which missed asserting the presence of it Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | | move verification token logic out of lost password controllerArthur Schiwon2021-09-091-258/+43
| | | | | | | | | | | | | | | | | | | | | - to make it reusable - needed for local email verification Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | | Merge pull request #28725 from nextcloud/disallow-public-page-in-2fa-flowLukas Reschke2021-09-071-27/+0
|\ \ \ | | | | | | | | Remove 2FA exemption from PublicPage annotation
| * | | Adjust testsLukas Reschke2021-09-061-27/+0
| | | | | | | | | | | | | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | | | Resolve absolute path in testsLukas Reschke2021-09-061-1/+1
|/ / / | | | | | | | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>