aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/User/UserTest.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Fix UserTest to return valid configuration valuesCôme Chilliet2025-02-101-0/+6
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Make user removal more resilientFerdinand Thiessen2024-09-261-14/+67
| | | | | | | | | | | | | | Currently there is a problem if an exception is thrown in `User::delete`, because at that point the user is already removed from the backend, but not all data is deleted. There is no way to recover from this state, as the user is gone no information is available anymore. This means the data is still available on the server but can not removed by any API anymore. The solution here is to first set a flag and backup the user home, this can be used to recover failed user deletions in a way the delete can be re-tried. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-34/+34
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-4/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix!: Remove symfony EventDispatcherInterface from UserJoas Schilling2023-07-271-6/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adapt tests to config value typingCôme Chilliet2023-04-051-2/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-201-2/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Keep non default protocol in cloud idJoas Schilling2022-06-091-53/+58
| | | | | | | | | When there is no protocol on the cloud id, we assume it's https:// But this means that when an http:// server currently sends an OCM invite to another server, the protocol is striped and the remote instance will try to talk back to https:// which might not be available. Signed-off-by: Joas Schilling <coding@schilljs.com>
* skip localstorage dependend user test when not using local user storageRobin Appelman2022-02-251-0/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Check style updateCarl Schwan2022-01-131-7/+7
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* enable the user to set a primary (notification) email address (backend)Arthur Schiwon2021-09-091-1/+4
| | | | | | | - specific getters and setters on IUser and implementation - new notify_email field in provisioning API Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* refs #21045 add app config to disable unlimited quota and to set max quotaJulien Veyssier2021-07-291-0/+65
| | | | | | | | | avoid unlimited quota as default_quota fallback value if unlimited quota is not allowed avoid getting/setting/displaying unlimited default quota if not allowed implement tests for unlimited quota restrictions Signed-off-by: Julien Veyssier <eneiluj@posteo.net> Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
* better cleanup of user files on user deletionRobin Appelman2021-04-271-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-34/+34
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-39/+39
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix recursive calls in logging via server methodsJoas Schilling2020-03-181-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move deprecated aliases over to new registrationRoeland Jago Douma2020-03-151-2/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* lib/private/User: do not change user properties if value has not changedLeon Klingele2019-04-111-16/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-011-32/+45
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fixed testsJohn Molakvoæ (skjnldsv)2018-04-091-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Use ::class in test mocksMorris Jobke2017-10-241-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* emit changeUser only if there really was a change (quota, displayname)Arthur Schiwon2017-06-011-1/+95
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Trigger change when a user is enabled/disabledJoas Schilling2017-04-251-1/+49
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use the correct Dummy and Backend classJoas Schilling2017-04-201-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Get user home folder before deletionVincent Petry2016-12-231-0/+32
| | | | | | | After the deletion getHome() will fail because the user doesn't exist any more, so we need to fetch that value earlier. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Improve OC\User\User coverageRoeland Jago Douma2016-12-201-49/+204
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only trigger postDelete hooks when the user was deleted...Joas Schilling2016-09-291-4/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Make sure that comments, notifications and preferences are deletedJoas Schilling2016-09-291-11/+74
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix getMock UserRoeland Jago Douma2016-09-131-21/+22
|
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-0/+479
* Move a-b to PSR-4 * Move c-d to PSR-4 * Move e+g to PSR-4 * Move h-l to PSR-4 * Move m-r to PSR-4 * Move s-u to PSR-4 * Move files/ to PSR-4 * Move remaining tests to PSR-4 * Remove Test\ from old autoloader