aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/User/ManagerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(users): Don't crash if disabled user is missing in the databaseartonge/fix/prevent_missing_users_from_crashing_disabled_users_searchLouis Chemineau2024-09-231-25/+29
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-28/+28
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-4/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat: rename users to account or personVincent Petry2024-02-131-1/+1
| | | | | | Replace translated text in most locations Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* fix!: Remove symfony EventDispatcherInterface from UserJoas Schilling2023-07-271-29/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* spaces are allowed in useridsSimon L2023-01-101-9/+9
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* Remove deprecated at matcher from tests/libCôme Chilliet2022-08-291-12/+12
| | | | | | Only 15 warnings left in there Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge branch 'master' into display-name-cache-publicCarl Schwan2022-08-151-2/+2
|\ | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
| * Fix psalm issues related to the user backendCarl Schwan2022-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | - Reflect the actual return value returned by the implementation in the the interface. E.g. IUser|bool -> IUser|false - Remove $hasLoggedIn parameter from private countUser implementation. Replace the two call with the equivalent countSeenUser - getBackend is nuallable, add this to the interface - Use backend interface to make psalm happy about call to undefined methods. Also helps with getting rid at some point of the old implementActions Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* | expose displayname cache trough a public interfaceRobin Appelman2022-05-181-1/+0
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix testsCarl Schwan2021-12-011-4/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Make mock config return default value to fix warningsCôme Chilliet2021-11-231-1/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Cache the user backend info for 300sJoas Schilling2021-02-151-25/+37
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-24/+24
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-091-0/+1
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-37/+37
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add typed create user eventsChristoph Wurst2019-12-031-44/+34
| | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-11/+11
| | | | 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>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-011-25/+29
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use a case insensitive search for emailRoeland Jago Douma2018-12-201-2/+3
| | | | | | | | Fixes #7084 Now entering wrongly cased email (roeland@ instead of Roeland@) for password reset etc. Will also work. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* filter null values for UserManager::getByEmailGeorg Ehrke2018-10-151-0/+33
| | | | Signed-off-by: Georg Ehrke <developer@georgehrke.com>
* Added case example to testsJohn Molakvoæ (skjnldsv)2018-05-261-2/+4
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix "Undefined method setExpectedException()"Joas Schilling2018-01-241-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* never translate login names when requiring with a user idArthur Schiwon2018-01-031-12/+28
| | | | | | where appropriate, the preLoginNameUsedAsUserName hook should be thrown. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* extend tests for status quoArthur Schiwon2018-01-031-0/+12
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use ::class in test mocksMorris Jobke2017-10-241-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Prevent SQL error message in case of errorLukas Reschke2017-08-171-1/+20
| | | | | | | | | | | | | | `\OC\User\Database::createUser` can throw a PHP exception in case the UID is longer than permitted in the database. This is against it's PHPDocs and we should cast this to `false`, so that the regular error handling triggers in. The easiest way to reproduce is on MySQL: 1. Create user `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in admin panel 2. Create user `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` in admin panel again 3. See SQL exception as error message Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* UserManager can now count disabled usersArthur Schiwon2017-04-291-0/+25
| | | | | | Users page takes advantage of that Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Use the new method in the old one to remove duplicate codeJoas Schilling2017-04-271-5/+11
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Better validation of allowed user namesJoas Schilling2017-04-181-0/+43
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Proper DI of configRoeland Jago Douma2016-10-281-20/+31
| | | | | | * Fixed comments Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* introduce callForSeenUsers and countSeenUsers (#26361)Jörn Friedrich Dreyer2016-10-281-1/+63
| | | | | | | | | | * introduce callForSeenUsers and countSeenUsers * add tests * oracle should support not null on clob * since 9.2.0
* Fix getMock UserRoeland Jago Douma2016-09-131-23/+24
|
* Fix failing tests after db splitRoeland Jago Douma2016-07-131-4/+4
|
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-0/+474
* 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