summaryrefslogtreecommitdiffstats
path: root/tests/lib/Comments
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>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Delete comments that expired nowVitor Mattos2022-07-251-1/+4
| | | | Signed-off-by: Vitor Mattos <vitor@php.rio>
* Adjust fake managerJoas Schilling2022-07-011-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* 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-152-1/+52
| | | | | | 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>
* Update ICommentsManager with reaction methodsVitor Mattos2022-02-031-0/+17
| | | | | | | | | | | | | Fix psalm errors Reorder methods and remove return null Use best pattern on docblock Goals: update https://github.com/ChristophWurst/nextcloud_composer/ with reaction methods. The script https://github.com/ChristophWurst/nextcloud_composer/blob/master/build.sh only get lib/public classes Signed-off-by: Vitor Mattos <vitor@php.rio>
* Merge pull request #30794 from ↵Joas Schilling2022-01-281-0/+12
|\ | | | | | | | | nextcloud/techdebt/noid/allow-to-get-comments-with-verb Allow to get comments with a given set of verbs
| * Fix fake managerJoas Schilling2022-01-211-0/+12
| | | | | | | | 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 unit testsJoas Schilling2022-01-051-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add integration tests for groupJoas Schilling2021-10-121-1/+6
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix unit testsJoas Schilling2021-02-061-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a function to get the unread count for multiple objects in one goJoas Schilling2020-11-041-0/+5
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix PHP CSJoas Schilling2020-10-221-1/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix manager creation and testingJoas Schilling2020-10-222-3/+30
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add ICommentsManager::load methodJohn Molakvoæ (skjnldsv)2020-10-201-0/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.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-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>