summaryrefslogtreecommitdiffstats
path: root/apps/theming/tests/Controller/ThemingControllerTest.php
Commit message (Collapse)AuthorAgeFilesLines
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+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>
* 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-271-3/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-251-3/+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-051-1/+5
| | | | 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-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/+2
| | | | | | | | | | | * 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-051-0/+55
| | | | 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-151-2/+2
|\ | | | | Convert theming app logo to PNG to show it properly in emails
| * Minor fixes and cleanupJulius Härtl2018-06-061-2/+2
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | 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-041-26/+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-191-130/+68
| | | | 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-061-1/+7
| | | | 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>
* 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>
* rename confusing getMailHeaderColor to getColorPrimary, ref #3491Jan-Christoph Borchardt2017-03-291-2/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Add test for creating AppData folderJulius Haertl2017-02-201-13/+47
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Use createMockJulius Haertl2017-02-161-38/+17
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Use ::class in tests and correct importJulius Haertl2017-02-161-17/+21
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Adapt ThemingController testsJulius Haertl2017-02-161-52/+81
| | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
* Merge pull request #3144 from nextcloud/use-data-download-responseMorris Jobke2017-01-191-5/+2
|\ | | | | Use DataDownloadResponse
| * Use DataDownloadResponseLukas Reschke2017-01-181-5/+2
| | | | | | | | | | | | | | 1. As documented 2. No need to show this inline, downloading has security advantages Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | theme app navigation menu highlight colorMorris Jobke2017-01-181-0/+4
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #840 from nextcloud/theming-icon-endpointMorris Jobke2016-11-181-1/+38
|\ | | | | Add dynamic icon creation
| * Use IAppManager instead of OC_AppJulius Haertl2016-11-181-1/+5
| | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>
| * Fix icon-folder cssJulius Haertl2016-11-181-5/+5
| | | | | | | | Signed-off-by: Julius Haertl <jus@bitgrid.net>