aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Comments
Commit message (Collapse)AuthorAgeFilesLines
* Format control structures, classes, methods and functionChristoph Wurst2020-04-104-27/+41
| | | | | | | | | | | | | | | 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>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-092-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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 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-272-45/+50
| | | | 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 a unit test for guests as wellJoas Schilling2019-07-111-4/+18
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Match mentions when the username is wrapped in quotesJoas Schilling2018-11-071-2/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to filter the unread count by verbJoas Schilling2018-07-301-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add pagination supportJoas Schilling2018-07-251-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to search by commentsJoas Schilling2018-07-251-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add another testMario Danic2018-06-081-1/+3
| | | | Signed-off-by: Mario Danic <mario@lovelyhq.com>
* Add a new regex testMario Danic2018-06-081-1/+3
| | | | Signed-off-by: Mario Danic <mario@lovelyhq.com>
* Fix FakeManagerJoas Schilling2018-04-191-0/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* 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>
* comments should compile mentions also if done by authorArthur Schiwon2018-01-171-2/+7
| | | | | | | | it is used by clients for formatting reasons, there is no reason not format the author if her handle is included in the comment body. It is unrelated to sending out notifications. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* 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-222-23/+72
| | | | | | | | | | * 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>
* update FakeManagerRobin Appelman2017-03-301-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* 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-263-6/+133
|\ | | | | | | | | nextcloud/comments-provide-displaynames-with-mentions comment mentions: show displayname not uid
| * add missing methods to test fake managerArthur Schiwon2016-10-201-0/+4
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * resolve displayname via manager and registerable resolversArthur Schiwon2016-10-191-0/+78
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
| * move mention extraction to (I)Comment and report mentions via DAVArthur Schiwon2016-10-191-6/+51
| | | | | | | | 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-072-5/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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>
* Add test for setTopmostParentId and getTopmostParentIdLukas Reschke2016-09-291-0/+4
| | | | | | This wasn't tested before as proven by the coverage data. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Fix getMock ManagerTestRoeland Jago Douma2016-09-131-4/+5
|
* Move tests/ to PSR-4 (#24731)Joas Schilling2016-05-204-0/+812
* 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