File tree 2 files changed +60
-2
lines changed
2 files changed +60
-2
lines changed Original file line number Diff line number Diff line change 1
1
<xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform"
2
2
xmlns : token =" http://xml.phpdox.net/token"
3
3
xmlns : src =" http://xml.phpdox.net/src"
4
+ xmlns : pu =" http://schema.phpunit.de/coverage/1.0"
4
5
xmlns =" http://www.w3.org/1999/xhtml"
5
6
exclude-result-prefixes =" token src" >
6
7
48
49
<li ><a href =" {$base}index.{$extension}" >Overview</a ></li >
49
50
<li class =" separator" ><a href =" {$base}source/index.{$extension}" >Source</a ></li >
50
51
51
-
52
+
52
53
</ul >
53
54
</div >
54
55
</xsl : template >
60
61
<tr >
61
62
<td class =" no" >
62
63
<xsl : for-each select =" //token:line" >
63
- <a class =" anker" href =" #line{@no}" ><xsl : value-of select =" @no" /></a >
64
+ <xsl : variable name =" no" select =" @no" />
65
+ <xsl : variable name =" ctx" select =" //src:enrichment[@type='phpunit']//pu:line[@nr = $no]" />
66
+ <xsl : variable name =" coverage" >
67
+ <xsl : if test =" count($ctx/pu:covered) > 0" > covered</xsl : if >
68
+ </xsl : variable >
69
+ <a class =" anker{$coverage}" href =" #line{@no}" ><xsl : value-of select =" @no" /></a >
70
+ <xsl : if test =" count($ctx/pu:covered) > 0" >
71
+ <div class =" coverage_details" >
72
+ <span >
73
+ Covered by <xsl : value-of select =" count($ctx/pu:covered)" /> test(s):
74
+ </span >
75
+ <ul >
76
+ <xsl : for-each select =" $ctx/pu:covered" >
77
+ <li ><xsl : value-of select =" @by" /></li >
78
+ </xsl : for-each >
79
+ </ul >
80
+ </div >
81
+ </xsl : if >
64
82
</xsl : for-each >
65
83
</td >
66
84
<td class =" line" >
Original file line number Diff line number Diff line change @@ -142,3 +142,43 @@ table.source td.line div:target pre {
142
142
.T_CONSTANT_ENCAPSED_STRING , .T_ENCAPSED_AND_WHITESPACE {
143
143
color : # DD0000 ;
144
144
}
145
+
146
+ .covered {
147
+ background-color : rgba (5 , 238 , 25 , 0.13 );
148
+ }
149
+
150
+ a .covered : hover + div {
151
+ left : 90px ;
152
+ }
153
+
154
+ .coverage_details {
155
+ position : absolute;
156
+ left : -10000px ;
157
+ margin : -1.4em 0 0 0 ;
158
+ background-color : # eee ;
159
+ box-shadow : 5px 5px 10px # 888 ;
160
+ z-index : 1 ;
161
+ padding : 1em ;
162
+ }
163
+
164
+ .coverage_details span {
165
+ font-weight : bold;
166
+ }
167
+
168
+ .coverage_details ul {
169
+ margin : 0 ;
170
+ padding : 1em ;
171
+ }
172
+
173
+ .coverage_details : before {
174
+ position : absolute;
175
+ content : "" ;
176
+ width : 12px ;
177
+ height : 12px ;
178
+ top : 3px ;
179
+ left : -6px ;
180
+ border : 0 ;
181
+ background-color : # eee ;
182
+ transform : rotate (45deg );
183
+ z-index : -1 ;
184
+ }
You can’t perform that action at this time.
0 commit comments