diff --git a/ChangeLog-9.6.md b/ChangeLog-9.6.md index c0d370b212a..f8f7db26f11 100644 --- a/ChangeLog-9.6.md +++ b/ChangeLog-9.6.md @@ -4,6 +4,10 @@ All notable changes of the PHPUnit 9.6 release series are documented in this fil ## [9.6.5] - 2023-MM-DD +### Changed + +* Backported the HTML and CSS improvements made to the `--testdox-html` from PHPUnit 10 + ### Fixed * [#5205](https://github.com/sebastianbergmann/phpunit/issues/5205): Wrong default value for optional parameter of `PHPUnit\Util\Test::parseTestMethodAnnotations()` causes `ReflectionException` diff --git a/src/Util/TestDox/HtmlResultPrinter.php b/src/Util/TestDox/HtmlResultPrinter.php index 013d1de81b2..2dc3d75fbb7 100644 --- a/src/Util/TestDox/HtmlResultPrinter.php +++ b/src/Util/TestDox/HtmlResultPrinter.php @@ -31,24 +31,46 @@ final class HtmlResultPrinter extends ResultPrinter text-rendering: optimizeLegibility; font-variant-ligatures: common-ligatures; font-kerning: normal; - margin-left: 2em; - background-color: #ffffff; - color: #000000; + margin-left: 2rem; + background-color: #fff; + color: #000; } body > ul > li { font-family: Source Serif Pro, PT Sans, Trebuchet MS, Helvetica, Arial; - font-size: 2em; + font-size: larger; } h2 { font-family: Tahoma, Helvetica, Arial; - font-size: 3em; + font-size: larger; + margin: 0; + padding: 0.5rem 0; } ul { list-style: none; - margin-bottom: 1em; + margin: 0; + padding: 0; + margin-bottom: 2rem; + padding-left: 1rem; + text-indent: -1rem; + } + + .success:before { + color: #4e9a06; + content: '✓'; + padding-right: 0.5rem; + } + + .defect { + color: #a40000; + } + + .defect:before { + color: #a40000; + content: '✗'; + padding-right: 0.5rem; } @@ -60,7 +82,7 @@ final class HtmlResultPrinter extends ResultPrinter */ private const CLASS_HEADER = <<<'EOT' -

%s

+

%s