aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* chore(tests): Adapt tests to the countUsers refactorCôme Chilliet2025-01-141-32/+9
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-151-11/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Add SPDX headerAndy Scherzinger2024-05-133-53/+6
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* Adapt tests to config value typingCôme Chilliet2023-04-051-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* composer run cs:fixCôme Chilliet2023-01-203-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fair use of push notificationsJoas Schilling2021-10-231-5/+4
| | | | | | | | | We want to keep offering our push notification service for free, but large users overload our infrastructure. For this reason we have to rate-limit the use of push notifications. If you need this feature, consider setting up your own push server or using Nextcloud Enterprise. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix support testsJoas Schilling2021-04-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | 2) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #0 (35, 15, 2, false) Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist 3) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #1 (35, 45, 15, false) Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist 4) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #2 (35, 45, 5, true) Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist 5) Test\Support\Subscription\RegistryTest::testDelegateIsHardUserLimitReachedWithoutSupportAppAndUserCount with data set #3 (35, 45, 55, false) Cannot stub or mock class or interface "Test\Support\Subscription\UserInterface" which does not exist Had to use the Database user backend, as using multiple interfaces is deprecated: https://github.com/sebastianbergmann/phpunit/issues/3955 > This functionality should be deprecated as "having to use it" is almost always a symptom of bad design. > More importantly, though, the support for the creation of test doubles that implement multiple interfaces > resulted in code that is hard to maintain. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add notification for user limitMorris Jobke2020-12-021-1/+31
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow subscription to indicate that a userlimit is reachedMorris Jobke2020-12-022-3/+89
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-4/+4
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add DummySubscription for testsDaniel Kesselberg2020-07-092-0/+68
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Make the subscription registry lazyRoeland Jago Douma2020-07-091-2/+7
| | | | | | | This will allow to do lazy registration here which should allow for loading less (or at least only when needed!). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow crash reporters registration during app bootstrapChristoph Wurst2020-06-191-5/+43
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* 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>
* Add system config flag to manually set that a subscription is availableJulius Härtl2020-03-101-1/+17
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-272-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix subscription testsJulius Härtl2019-06-171-0/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add interfaces to interact with subscription from support appMorris Jobke2019-05-131-0/+87
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Allow crash reporters to catpture any messageChristoph Wurst2019-05-091-0/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add breadcrumb support to crash reportersChristoph Wurst2018-09-051-0/+15
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix risky tests without assertionsJoas Schilling2018-01-251-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add a mechanism to register crach reportersChristoph Wurst2017-11-141-0/+68
This adds a crash reporter registry, which is meant for third party apps to hook into the error logging/reporting chain. This way, external tools like Sentry can be used to track and aggregate system crashes. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>