aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/SystemTag/SystemTagManagerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(systemtags): case-insensitive search & prevent duplicatesskjnldsv12 days1-33/+21
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* chore: run rectorrector-phpunit10Robin Appelman2025-07-011-30/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: run rector on testsRobin Appelman2025-06-121-6/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test: Fix non-static data providersJoas Schilling2025-05-151-8/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(systemtags): add setting to block non admin to create system tagsBenjamin Gaussorgues2025-01-221-20/+92
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(systemtags): add color support backendskjnldsv2024-12-061-20/+28
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-18/+18
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-131-5/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Move SystemTags events to IEventDispatcherJoas Schilling2023-07-271-6/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix SystemTagManagerTest#createTag testMarcel Klehr2023-02-241-1/+1
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Update tests/lib/SystemTag/SystemTagManagerTest.phpMarcel Klehr2023-02-241-5/+2
| | | | Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* fix(SystemTagManager): Truncate overlong tag namesMarcel Klehr2023-02-241-4/+12
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+0
| | | | | | | | | | | | | | | 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>
* Fix multiline commentsChristoph Wurst2020-04-081-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-271-1/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-1/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-5/+5
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-16/+18
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-271-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-221-2/+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>
* Use ::class in test mocksMorris Jobke2017-10-241-3/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* test setTagGroups with empty groupidsJörn Friedrich Dreyer2017-03-191-0/+9
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Act on effective system tag canAssign permissionVincent Petry2016-05-201-0/+1
| | | | | | | | | Whenever the server returns true for the can-assign Webdav property of a system tag, it means the current user is allowed to assign, regardless of the value of user-assignable. This commit brings the proper logic to the web UI to make it possible for users to assign when they have the permission.
* Add system tag assignability check with groupsVincent Petry2016-05-201-1/+21
| | | | | | Whenever a user is not an admin, a tag is visible but not user-assignable, check whether the user is a member of the allowed groups.
* Add systemtag_group table and get/set methodsVincent Petry2016-05-201-0/+17
| | | | | Added systemtag to group mapping table. Added methods in ISystemTagManager to get/set the group mappings.
* Updated canUser* functions in SystemTagManager to accept objectsVincent Petry2016-05-201-29/+15
|
* Add interface methods for permission checkVincent Petry2016-05-201-0/+82
| | | | | | Instead of checking for admin perm, use interface method canUserAssignTag and canUserSeeTag to check for permissions. Allows for more flexible implementation.
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-0/+424
* 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