@@ -305,6 +305,33 @@ public function testGetLoginBackground() {
305305 }
306306
307307 public function testGetStylesheetWithOnlyColor () {
308+ $ this ->config
309+ ->expects ($ this ->at (0 ))
310+ ->method ('getAppValue ' )
311+ ->with ('theming ' , 'cachebuster ' , '0 ' )
312+ ->willReturn ('0 ' );
313+ $ this ->config
314+ ->expects ($ this ->at (1 ))
315+ ->method ('getAppValue ' )
316+ ->with ('theming ' , 'color ' , '' )
317+ ->willReturn ('#000 ' );
318+ $ this ->config
319+ ->expects ($ this ->at (2 ))
320+ ->method ('getAppValue ' )
321+ ->with ('theming ' , 'logoMime ' , '' )
322+ ->willReturn ('' );
323+ $ this ->config
324+ ->expects ($ this ->at (3 ))
325+ ->method ('getAppValue ' )
326+ ->with ('theming ' , 'backgroundMime ' , '' )
327+ ->willReturn ('' );
328+
329+ $ expected = new Http \DataDownloadResponse ('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000} ' , 'style ' , 'text/css ' );
330+ $ expected ->cacheFor (3600 );
331+ @$ this ->assertEquals ($ expected , $ this ->themingController ->getStylesheet ());
332+ }
333+
334+ public function testGetStylesheetWithOnlyColorInvert () {
308335 $ this ->config
309336 ->expects ($ this ->at (0 ))
310337 ->method ('getAppValue ' )
@@ -326,7 +353,7 @@ public function testGetStylesheetWithOnlyColor() {
326353 ->with ('theming ' , 'backgroundMime ' , '' )
327354 ->willReturn ('' );
328355
329- $ expected = new Http \DataDownloadResponse ('#body-user #header,#body-settings #header,#body-public #header {background-color: #fff} ' , 'style ' , 'text/css ' );
356+ $ expected = new Http \DataDownloadResponse ('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff} ' , 'style ' , 'text/css ' );
330357 $ expected ->cacheFor (3600 );
331358 @$ this ->assertEquals ($ expected , $ this ->themingController ->getStylesheet ());
332359 }
@@ -416,7 +443,43 @@ public function testGetStylesheetWithAllCombined() {
416443 ->with ('theming ' , 'backgroundMime ' , '' )
417444 ->willReturn ('image/png ' );
418445
419- $ expected = new Http \DataDownloadResponse ('#body-user #header,#body-settings #header,#body-public #header {background-color: #abc}#header .logo {
446+ $ expected = new Http \DataDownloadResponse ('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #abc}#header .logo {
447+ background-image: url( \'./logo?v=0 \');
448+ background-size: contain;
449+ }
450+ #header .logo-icon {
451+ background-image: url( \'./logo?v=0 \');
452+ background-size: contain;
453+ }#body-login {
454+ background-image: url( \'./loginbackground?v=0 \');
455+ } ' , 'style ' , 'text/css ' );
456+ $ expected ->cacheFor (3600 );
457+ @$ this ->assertEquals ($ expected , $ this ->themingController ->getStylesheet ());
458+ }
459+
460+ public function testGetStylesheetWithAllCombinedInverted () {
461+ $ this ->config
462+ ->expects ($ this ->at (0 ))
463+ ->method ('getAppValue ' )
464+ ->with ('theming ' , 'cachebuster ' , '0 ' )
465+ ->willReturn ('0 ' );
466+ $ this ->config
467+ ->expects ($ this ->at (1 ))
468+ ->method ('getAppValue ' )
469+ ->with ('theming ' , 'color ' , '' )
470+ ->willReturn ('#fff ' );
471+ $ this ->config
472+ ->expects ($ this ->at (2 ))
473+ ->method ('getAppValue ' )
474+ ->with ('theming ' , 'logoMime ' , '' )
475+ ->willReturn ('text/svg ' );
476+ $ this ->config
477+ ->expects ($ this ->at (3 ))
478+ ->method ('getAppValue ' )
479+ ->with ('theming ' , 'backgroundMime ' , '' )
480+ ->willReturn ('image/png ' );
481+
482+ $ expected = new Http \DataDownloadResponse ('#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}#header .logo {
420483 background-image: url( \'./logo?v=0 \');
421484 background-size: contain;
422485 }
0 commit comments