aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Core/Middleware
Commit message (Collapse)AuthorAgeFilesLines
* Adjust testsLukas Reschke2021-09-061-27/+0
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* 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>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-20/+20
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-271-6/+6
| | | | 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>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * 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>
* Harden middleware checkRoeland Jago Douma2019-10-251-4/+85
| | | | | | | These annotations will allow for extra checks. And thus make it harder to break things. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow 2FA to be setup on first loginRoeland Jago Douma2019-05-171-0/+34
| | | | | | | | | Once 2FA is enforced for a user and they have no 2FA setup yet this will now prompt them with a setup screen. Given that providers are enabled that allow setup then. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use ::class in test mocksMorris Jobke2017-10-241-2/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix testsRoeland Jago Douma2017-07-311-6/+11
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix getMock TwoFactorMiddlewareTestRoeland Jago Douma2016-09-061-8/+14
|
* prevent infinite redirect loops if the there is no 2fa provider to passChristoph Wurst2016-08-241-0/+2
| | | | | | | This fixes infinite loops that are caused whenever a user is about to solve a 2FA challenge, but the provider app is disabled at the same time. Since the session value usually indicates that the challenge needs to be solved before we grant access we have to remove that value instead in this special case.
* remember redirect_url when solving the 2FA challengeChristoph Wurst2016-06-011-4/+15
|
* Move parallel merged auth tests to PSR-4Joas Schilling2016-05-251-0/+183