summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests/Controller
Commit message (Collapse)AuthorAgeFilesLines
* Fix testsJulius Härtl2020-09-241-83/+26
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-242-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-122-13/+13
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Move theming js to initial stateRoeland Jago Douma2020-06-051-75/+0
| | | | | | | | A bit more elegant. Plus it will allow us to also write a proper @nextcloud/theming package. To make life easier down the line for all. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-4/+2
| | | | | | | | | | | | | | | 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-10/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-091-1/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-272-4/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-252-4/+0
| | | | | | | | 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>
* Update license headersChristoph Wurst2019-12-052-3/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix the theming testsRoeland Jago Douma2019-12-041-0/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Mode to modern phpunitRoeland Jago Douma2019-11-272-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-272-3/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-222-6/+7
| | | | | | | | | | | * 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>
* Validate urls in theming settings and properly handle error messagesJulius Härtl2019-07-311-4/+14
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Disables SVG favicon uploads when imagemagick is missing.Michael Weimann2018-09-052-2/+57
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* Fixed theming testsJohn Molakvoæ (skjnldsv)2018-06-201-15/+15
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Merge pull request #9258 from nextcloud/theming-logo-pngMorris Jobke2018-06-152-7/+10
|\ | | | | Convert theming app logo to PNG to show it properly in emails
| * Minor fixes and cleanupJulius Härtl2018-06-062-7/+10
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix possible test timing issues in IconControllerRoeland Jago Douma2018-06-131-2/+4
| | | | | | | | | | | | | | Since the response now handles the caching. We need to provide a default ITimeFactory mock. Else you might have failing tests. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Mock the timefactory in the theming testsRoeland Jago Douma2018-06-071-5/+7
|/ | | | | | | Now that the cache logic is moved to the theming controller we must properly overwrite this service. Else it could do :boom: in tests. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix usageRoeland Jago Douma2018-06-042-51/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* also add a privacy linkArthur Schiwon2018-05-241-0/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #9437 from nextcloud/feature/noid/imprintRoeland Jago Douma2018-05-171-0/+2
|\ | | | | allow to specify a link to a legal notice
| * fix testsArthur Schiwon2018-05-111-0/+2
| | | | | | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Add Content-Disposition headerJulius Härtl2018-05-171-1/+3
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Properly check mime type of the uploaded fileJulius Härtl2018-05-171-6/+7
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix theming testsJulius Härtl2018-04-192-152/+90
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update ThemingControllerTest.phprakekniven2018-03-191-2/+2
| | | Adjusted test
* Update ThemingControllerTest.phprakekniven2018-03-101-1/+1
| | | Fixed tests for https://github.com/nextcloud/server/pull/8633
* Add mock to setupKyle Fazzari2018-02-241-16/+4
| | | | Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
* theming: handle not being in the serverrootKyle Fazzari2018-02-201-0/+34
| | | | | | | | | | | | | | Currently, the theming app assumes it's in the serverroot. However, with Nextcloud's flexibility regarding configurable app paths, this is not a safe assumption to make. If it happens to be an incorrect assumption, the theming app fails to work. Instead of relying on the serverroot, just use the path from the AppManager and utilize relative paths for assets from there. Fix #8462 Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
* Update license headersMorris Jobke2017-11-062-11/+20
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-241-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Theming: Add tests for mimetype and upload error checksJulius Härtl2017-10-031-4/+158
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Theming: Handle errors on uploaded files properlyJulius Härtl2017-10-031-16/+25
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add themed manifest.json to theming appJulius Härtl2017-09-121-0/+49
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Provide "server.css" URL in ThemingController responseDaniel Calviño Sánchez2017-08-101-1/+38
| | | | | | | | | | | | | | Pull request #5429 made cached SCSS files depend on a hash of the base URL, so the "/css/core/server.css" file does no longer exist. The "server.css" URL must be known by the Theming app in order to update the stylesheets when previewing the changes to the theme, so the DataResponse from the controller now provides the full URL to the "server.css" file that has to be reloaded (if any). The "server.css" URL provided by the response will be taken into account by the JavaScript front-end in a following commit. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Split updateStylesheet tests for success and errorDaniel Calviño Sánchez2017-08-101-17/+51
| | | | | | | | This is a preparatory step for a following commit in which the properties present in the response will change depending on whether the request was successful or not. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Unify DataResponse format with its uses in the rest of the fileDaniel Calviño Sánchez2017-08-101-6/+9
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Merge pull request #4888 from nextcloud/theming-fallback-iconsLukas Reschke2017-05-181-7/+33
|\ | | | | Fallback to default favicon
| * Inject FileAccessHelper for proper testingJulius Härtl2017-05-181-1/+14
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * Add proper Content-Type to iconsJulius Härtl2017-05-171-2/+2
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * Fallback to default faviconJulius Härtl2017-05-171-6/+19
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix testsJulius Härtl2017-05-171-5/+2
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix tests for theming backgroundColorJulius Härtl2017-05-081-4/+47
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Delete theming images when logo/background is reset to defaultJulius Härtl2017-04-301-0/+50
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Implement scss variable injection by OC_DefaultsJulius Haertl2017-04-251-519/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net> Add Scss variables to example theme and theming app Signed-off-by: Julius Haertl <jus@bitgrid.net> Use SCSSCacher to build theming css Signed-off-by: Julius Härtl <jus@bitgrid.net> Update theming.scss Signed-off-by: Julius Härtl <jus@bitgrid.net> Code cleanup Signed-off-by: Julius Härtl <jus@bitgrid.net> Fix tests Signed-off-by: Julius Härtl <jus@bitgrid.net> Inject SCSSCacher for easier testing Signed-off-by: Julius Härtl <jus@bitgrid.net> Fix typehint Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Generate absolute URLs Signed-off-by: Lukas Reschke <lukas@statuscode.ch> Fix tests to always use absolute urls for theming images Signed-off-by: Julius Härtl <jus@bitgrid.net> MailheaderColor -> ColorPrimary Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>