aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Comments/ManagerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Cover expire_date with unit testsVitor Mattos2023-04-261-2/+28
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Split the comments ids by chunksVitor Mattos2023-03-011-0/+1207
| | | | | | | | | Split the comments ids by chunks to prevent error with Oracle database that can't do a query with more than 1000 parameters. https://github.com/nextcloud/spreed/issues/8287 Signed-off-by: Vitor Mattos <vitor@php.rio>
* Delete comments that expired nowVitor Mattos2022-07-251-1/+4
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Allow to expire comments of multiple objects with one callJoas Schilling2022-07-011-3/+40
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Follow the most common pattern used in projectVitor Mattos2022-06-201-2/+2
| | | | | | | | | | | ``` git grep strval|wc -l 32 git grep "(string)"|wc -l 481 ``` Signed-off-by: Vitor Mattos <vitor@php.rio>
* Add comments expire dateVitor Mattos2022-06-151-1/+48
| | | | | | https://github.com/nextcloud/spreed/pull/7327 Signed-off-by: Vitor Mattos <vitor@php.rio>
* Extract the EmojiService from user status and add an OCP interfaceJoas Schilling2022-04-281-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow reactions also with other combined emojisJoas Schilling2022-03-241-7/+7
| | | | | | | | Honerful copying the EmojiService from UserStatus for now I think this should be put into a decent place and then reused, but I couldn't find somethin short term before beta1 Signed-off-by: Joas Schilling <coding@schilljs.com>
* Refactor and fixes on testsVitor Mattos2022-01-211-124/+135
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Fix check after change from string to mb_stringVitor Mattos2022-01-211-2/+3
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Limit the summary and sort it afterwardsJoas Schilling2022-01-211-4/+29
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Order the reaction summary, improvements on validationsVitor Mattos2022-01-211-0/+84
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Disable reactions if database don't support utf8mb4Vitor Mattos2022-01-211-4/+1
| | | | | | Fix column size Signed-off-by: Vitor Mattos <vitor@php.rio>
* Skip if dont support 4 bytes UTF8Vitor Mattos2022-01-211-0/+13
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Add unit testsVitor Mattos2022-01-211-4/+261
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Fix PHP CSJoas Schilling2020-10-221-1/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix manager creation and testingJoas Schilling2020-10-221-2/+12
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-16/+16
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | 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-37/+40
| | | | 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 proper comment offset supportJoas Schilling2018-04-181-0/+42
| | | | | | | The offset is based on the last known comment instead of limit-offset, so new comments don't mess up requests which get the history of an object- Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix comment sorterArthur Schiwon2017-10-301-31/+0
| | | | | | | background: we have a flat hierarchy of comments, not a tree. therefore we can also remove again the unnecessary additions. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* AutoCompletion backendArthur Schiwon2017-10-221-18/+63
| | | | | | | | | | * introduce a Controller for requests * introduce result sorting mechanism * extend Comments to retrieve commentors (actors) in a tree * add commenters sorter * add share recipients sorter Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Can not insert auto increment on oracleJoas Schilling2017-08-021-25/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add test for getting unread comment count by folderRobin Appelman2017-03-301-76/+139
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #1738 from ↵Morris Jobke2016-10-261-0/+78
|\ | | | | | | | | nextcloud/comments-provide-displaynames-with-mentions comment mentions: show displayname not uid
| * resolve displayname via manager and registerable resolversArthur Schiwon2016-10-191-0/+78
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Fix DateTime comparissonRoeland Jago Douma2016-10-211-4/+4
|/ | | | | | | Datetime now returns microseconds. But if the database doesn't store those comparing them for equality most likely fails. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* emit pre-update event for commentsArthur Schiwon2016-10-121-2/+2
| | | | | | | * notifications can be cleaned up, no polluted DB * updating comments will re-notify users or remove notifications, depending on the message Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Notificacations for simple @-mentioning in commentsArthur Schiwon2016-10-071-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (WIP) notify user when mentioned in comments Fix doc, and create absolute URL for as notification link. PSR-4 compatibility changes also move notification creation to comments app Do not notify yourself unit test for controller and application smaller fixes - translatable app name - remove doubles in mention array - micro perf optimization - display name: special label for deleted users, keep user id for users that could not be fetched from userManager Comment Notification-Listener Unit Test fix email adresses remove notification when triggering comment was deleted add and adjust tests add missing @license tags simplify NotificationsController registration appinfo simplification, php docs make string easier to translate adjust test replace dispatcher-based listeners with a registration method and interface safer to not pass optional data parameter to setSubject for marking as processed. ID and mention suffices Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> update comment Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Fix getMock ManagerTestRoeland Jago Douma2016-09-131-4/+5
|
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-201-0/+632
* 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