Skip to content

Commit 3d3757a

Browse files
Merge branch '9.2' into 10.0
2 parents 842834f + 9d7019d commit 3d3757a

File tree

8 files changed

+36
-8
lines changed

8 files changed

+36
-8
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
"phpunit/phpunit": "^10.0"
4747
},
4848
"suggest": {
49-
"ext-pcov": "*",
50-
"ext-xdebug": "*"
49+
"ext-pcov": "PHP extension that provides line coverage",
50+
"ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
5151
},
5252
"autoload": {
5353
"classmap": [

src/Report/Html/Renderer/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function render(FileNode $node, string $file): void
125125
[
126126
'items' => $this->renderItems($node),
127127
'lines' => $this->renderSourceWithLineCoverage($node),
128-
'legend' => '<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>',
128+
'legend' => '<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>',
129129
'structure' => '',
130130
]
131131
);

src/Report/Html/Renderer/Template/css/style.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,31 @@ table + .structure-heading {
128128
border-top: 1px solid lightgrey;
129129
padding-top: 0.5em;
130130
}
131+
132+
.legend {
133+
font-weight: bold;
134+
margin-right: 2px;
135+
padding-left: 10px;
136+
padding-right: 10px;
137+
text-align: center;
138+
}
139+
140+
.covered-by-small-tests {
141+
background-color: #99cb84;
142+
}
143+
144+
.covered-by-medium-tests {
145+
background-color: #c3e3b5;
146+
}
147+
148+
.covered-by-large-tests {
149+
background-color: #dff0d8;
150+
}
151+
152+
.not-covered {
153+
background-color: #f2dede;
154+
}
155+
156+
.not-coverable {
157+
background-color: #fcf8e3;
158+
}

tests/_files/Report/HTML/CoverageForBankAccount/BankAccount.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
<footer>
236236
<hr/>
237237
<h4>Legend</h4>
238-
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
238+
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
239239
<p>
240240
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
241241
</p>

tests/_files/Report/HTML/CoverageForClassWithAnonymousFunction/source_with_class_and_anonymous_function.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
<footer>
155155
<hr/>
156156
<h4>Legend</h4>
157-
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
157+
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
158158
<p>
159159
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
160160
</p>

tests/_files/Report/HTML/CoverageForFileWithIgnoredLines/source_with_ignore.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
<footer>
186186
<hr/>
187187
<h4>Legend</h4>
188-
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
188+
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
189189
<p>
190190
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
191191
</p>

tests/_files/Report/HTML/PathCoverageForBankAccount/BankAccount.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
<footer>
334334
<hr/>
335335
<h4>Legend</h4>
336-
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
336+
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
337337
<p>
338338
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
339339
</p>

tests/_files/Report/HTML/PathCoverageForSourceWithoutNamespace/source_without_namespace.php.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
<footer>
174174
<hr/>
175175
<h4>Legend</h4>
176-
<p><span class="success"><strong>Executed</strong></span><span class="danger"><strong>Not Executed</strong></span><span class="warning"><strong>Dead Code</strong></span></p>
176+
<p><span class="legend covered-by-small-tests">Covered by small (and larger) tests</span><span class="legend covered-by-medium-tests">Covered by medium (and large) tests</span><span class="legend covered-by-large-tests">Covered by large tests (and tests of unknown size)</span><span class="legend not-covered">Not covered</span><span class="legend not-coverable">Not coverable</span></p>
177177
<p>
178178
<small>Generated by <a href="https://github.com/sebastianbergmann/php-code-coverage" target="_top">php-code-coverage %s</a> using <a href="%s" target="_top">%s</a> at %s.</small>
179179
</p>

0 commit comments

Comments
 (0)