1 <?php
defined('SYSPATH') OR die('No direct access allowed.'); ?
>
2 <style type
="text/css">
5 font
-family
: Monaco
, 'Courier New';
6 background
-color
: #F8FFF8;
10 border
: 1px solid
#E5EFF8;
18 #kohana-unit-test table
23 border
-collapse
: collapse
;
24 border
-top
: 1px solid
#E5EFF8;
25 border
-right
: 1px solid
#E5EFF8;
26 border
-left
: 1px solid
#E5EFF8;
32 border
-bottom
: 1px solid
#E5EFF8;
33 background
-color
: #263038;
39 background
-color
: #FFF;
40 border
-bottom
: 1px solid
#E5EFF8;
43 #kohana-unit-test .k-stats
49 #kohana-unit-test .k-debug
52 background
-color
: #FFF0F0;
53 border
: 1px solid
#FFD0D0;
54 border
-right
-color
: #FFFBFB;
55 border
-bottom
-color
: #FFFBFB;
58 #kohana-unit-test .k-altrow td
60 background
-color
: #F7FBFF;
62 #kohana-unit-test .k-name
65 border
-right
: 1px solid
#E5EFF8;
67 #kohana-unit-test .k-passed
69 background
-color
: #E0FFE0;
71 #kohana-unit-test .k-altrow .k-passed
73 background
-color
: #D0FFD0;
75 #kohana-unit-test .k-failed
77 background
-color
: #FFE0E0;
79 #kohana-unit-test .k-altrow .k-failed
81 background
-color
: #FFD0D0;
83 #kohana-unit-test .k-error
85 background
-color
: #FFFFE0;
87 #kohana-unit-test .k-altrow .k-error
89 background
-color
: #FFFFD1;
93 <div id
="kohana-unit-test">
97 foreach ($results as $class => $methods):
104 <th
><?php
echo $class ?
></th
>
106 <?php
printf('%s: %.2f%%', Kohana
::lang('unit_test.score'), $stats[$class]['score']) ?
> |
107 <?php
echo Kohana
::lang('unit_test.total'), ': ', $stats[$class]['total'] ?
>,
108 <?php
echo Kohana
::lang('unit_test.passed'), ': ', $stats[$class]['passed'] ?
>,
109 <?php
echo Kohana
::lang('unit_test.failed'), ': ', $stats[$class]['failed'] ?
>,
110 <?php
echo Kohana
::lang('unit_test.errors'), ': ', $stats[$class]['errors'] ?
>
114 <?php
if (empty($methods)): ?
>
117 <td colspan
="2"><?php
echo Kohana
::lang('unit_test.no_tests_found') ?
></td
>
122 foreach ($methods as $method => $result):
124 // Hide passed tests from report
125 if ($result === TRUE AND $hide_passed === TRUE)
130 <tr
class="<?php echo text::alternate('', 'k-altrow') ?>">
131 <td
class="k-name"><?php
echo $method ?
></td
>
133 <?php
if ($result === TRUE): ?
>
135 <td
class="k-passed"><strong
><?php
echo Kohana
::lang('unit_test.passed') ?
></strong
></td
>
137 <?php
elseif ($result instanceof Kohana_Unit_Test_Exception
): ?
>
139 <td
class="k-failed">
140 <strong
><?php
echo Kohana
::lang('unit_test.failed') ?
></strong
>
141 <pre
><?php
echo html
::specialchars($result->getMessage()) ?
></pre
>
142 <?php
echo html
::specialchars($result->getFile()) ?
> (<?php
echo Kohana
::lang('unit_test.line') ?
> 
;<?php
echo $result->getLine() ?
>)
144 <?php
if ($result->getDebug() !== NULL): ?
>
145 <pre
class="k-debug" title
="Debug info"><?php
echo '(', gettype($result->getDebug()), ') ', html
::specialchars(var_export($result->getDebug(), TRUE)) ?
></pre
>
150 <?php
elseif ($result instanceof Exception
): ?
>
153 <strong
><?php
echo Kohana
::lang('unit_test.error') ?
></strong
>
154 <pre
><?php
echo html
::specialchars($result->getMessage()) ?
></pre
>
155 <?php
echo html
::specialchars($result->getFile()) ?
> (<?php
echo Kohana
::lang('unit_test.line') ?
> 
;<?php
echo $result->getLine() ?
>)