summaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/AvatarControllerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* fix Controller testsArthur Schiwon2022-07-221-2/+3
| | | | | | | | - added pageTitle in code was missing in expectations - fixed warnings of superflouos parameter - fixed wrong type of mock Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update core to PHP 7.4 standardCarl Schwan2022-05-201-9/+9
| | | | | | | - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Only allow avatars in 64 and 512 pixel sizeJoas Schilling2022-02-071-11/+51
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix tests and avoid PHP errors in themCôme Chilliet2021-11-231-2/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused members and importsJoas Schilling2020-09-081-9/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* The privacy setting is only about syncing to other serversJoas Schilling2020-09-031-33/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-11/+11
| | | | | | \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>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Always use status 200 for avatar responseDaniel Kesselberg2020-03-011-1/+5
| | | | | | As discussed in #18603 caching a 201 response is hard. It's now possible to distinguish between generated and uploaded avatars by reading the X-NC-IsCustomAvatar (0 = generated, 1 = uploaded) header. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #17715 from nextcloud/fix/5456/respect_avatar_privacyJoas Schilling2019-12-041-1/+42
|\ | | | | Honor avatar visibility settings
| * Update testsRoeland Jago Douma2019-11-131-1/+42
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Mode to modern phpunitRoeland Jago Douma2019-11-271-1/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | More fixesRoeland Jago Douma2019-11-271-1/+1
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Make phpunit8 compatibleRoeland Jago Douma2019-11-271-2/+2
| | | | | | | | 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>
* Implement guest avatar endpointMichael Weimann2019-02-071-2/+2
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Fix unit testJoas Schilling2018-08-011-1/+20
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix testsRoeland Jago Douma2017-11-291-6/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use ::class in test mocksMorris Jobke2017-10-241-5/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Return the user id in case of an errorJoas Schilling2017-08-291-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Check the mimetype before reading the content and catch exceptionJoas Schilling2016-10-181-2/+46
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix testsRoeland Jago Douma2016-08-301-1/+6
|
* AvatarController use proper JSONResponseRoeland Jago Douma2016-08-291-3/+3
| | | | | * Do not rely on DataResponse magic. We want JSON so use JSON * Fix tests
* AvatarController cleanupRoeland Jago Douma2016-08-251-62/+83
| | | | | | | * Use all DI components * Let the AppFramework resolve the AvatarController * Update unit tests * Unit tests no longer require DB
* We have to mock the is_uploaded_file in the OC\Core\Controller namespaceRoeland Jago Douma2016-08-151-8/+10
|
* Fix mock call in AvatarControllerTestRoeland Jago Douma2016-08-151-12/+12
|
* Move tests/core/ to PSR-4Joas Schilling2016-05-191-0/+436