From 9d917ce41e8d679cfdb1345f38b1a28f2861b368 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 6 Sep 2021 08:43:53 +0200 Subject: [PATCH] Improve Testdox HTML styling on custom browser settings Browsers support custom colour settings. Some people might change default text and background colour. The report defines custom colour for successful and failed tests. It should therefore ensure that those colours work as expected. Background colour and default text colour are set in addition. This ensures an expected end result, no matter what colours might be set as defaults. --- src/Util/TestDox/HtmlResultPrinter.php | 2 ++ tests/end-to-end/loggers/testdox-html.phpt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/Util/TestDox/HtmlResultPrinter.php b/src/Util/TestDox/HtmlResultPrinter.php index c57480327a2..354d045da9c 100644 --- a/src/Util/TestDox/HtmlResultPrinter.php +++ b/src/Util/TestDox/HtmlResultPrinter.php @@ -31,6 +31,8 @@ final class HtmlResultPrinter extends ResultPrinter font-variant-ligatures: common-ligatures; font-kerning: normal; margin-left: 2em; + background-color: #ffffff; + color: #000000; } body > ul > li { diff --git a/tests/end-to-end/loggers/testdox-html.phpt b/tests/end-to-end/loggers/testdox-html.phpt index acc52412e71..e8b81b1d107 100644 --- a/tests/end-to-end/loggers/testdox-html.phpt +++ b/tests/end-to-end/loggers/testdox-html.phpt @@ -24,6 +24,8 @@ PHPUnit %s by Sebastian Bergmann and contributors. font-variant-ligatures: common-ligatures; font-kerning: normal; margin-left: 2em; + background-color: #ffffff; + color: #000000; } body > ul > li {