summaryrefslogtreecommitdiffstats
path: root/tests/lib/Group
Commit message (Collapse)AuthorAgeFilesLines
* Migrate from ILogger to LoggerInterface where needed in the testsCôme Chilliet2022-03-241-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix types in the Group ManagerRoeland Jago Douma2021-03-031-0/+3
| | | | | | | | | Psalm found an issue. However the issue found was because of lying docblocks. Fixed those and did some typing to make it all better. For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-2/+2
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>
* dont get the group details if we only ask for the idRobin Appelman2020-05-071-11/+9
| | | | | | | currenty when getting the groups for a user, the full group object is always created (and cached) even if only the groupid is required Signed-off-by: Robin Appelman <robin@icewind.nl>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-15/+14
| | | | | | | | | | | | | | | 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>
* Remove space between switch case and colonChristoph Wurst2020-04-091-32/+32
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-13/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix multiline commentsChristoph Wurst2020-04-081-19/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-2/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-2/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-264-55/+55
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-253-121/+121
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-273-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-275-6/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #17896 from nextcloud/fix/noid/consider-create-group-resultblizzz2019-11-251-0/+30
|\ | | | | take group creation result into consideration
| * take group creation result into considerationArthur Schiwon2019-11-251-0/+30
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Some php-cs fixesRoeland Jago Douma2019-11-221-1/+2
|/ | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add dispatcher events to User and Group objectsJoas Schilling2019-03-012-53/+68
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Tests fixJohn Molakvoæ (skjnldsv)2018-06-151-5/+5
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fixed caldav tests and metadata 2John Molakvoæ (skjnldsv)2018-03-081-3/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix Metadata testsJohn Molakvoæ (skjnldsv)2018-03-081-1/+8
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix risky tests without assertionsJoas Schilling2018-01-251-0/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use ::class in test mocksMorris Jobke2017-10-241-2/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove legacy OC_User_Backend and OC_User_InterfaceRoeland Jago Douma2017-07-241-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix 5.6 duplicate class importJoas Schilling2017-03-171-3/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Clean up the testJoas Schilling2017-03-171-81/+52
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use DIJoas Schilling2017-03-171-27/+31
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Skip null groups in group manager (#26871) (#26956)Vincent Petry2017-03-171-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Skip null groups in group manager (#26871) * Skip null groups in group manager * Also skip null groups in group manager's search function * Add more group null checks in sharing code * Add unit tests for null group safety in group manager * Add unit tests for sharing code null group checks * Added tests for null groups handling in sharing code * Ignore moveShare optional repair in mount provider In some cases, data is inconsistent in the oc_share table due to legacy data. The mount provider might attempt to make it consistent but if the target group does not exist any more it cannot work. In such case we simply ignore the exception as it is not critical. Keeping the exception would break user accounts as they would be unable to use their filesystem. * Adjust null group handing + tests * Fix new group manager tests Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove legacy class OC_Group and OC_UserMorris Jobke2017-03-091-208/+0
| | | | | | * basically a straight replacement of the wrapped code at the calling code parts Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* fix more testsArthur Schiwon2016-12-221-23/+23
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Adding group display name supportVincent Petry2016-12-221-214/+223
|
* Fix getMock MetaDataTestRoeland Jago Douma2016-09-071-1/+3
|
* LegacyGroupTest need DBRoeland Jago Douma2016-07-111-0/+6
| | | | | Those old tests make it impossible in the current state to abstract away.
* Improve ManagerTestRoeland Jago Douma2016-07-112-207/+205
| | | | | * No DB required * Fixed phpunit 5.4 warnings
* Improve GroupTestRoeland Jago Douma2016-07-111-43/+124
| | | | * No longer require DB
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-207-0/+1885
* 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