Show
Ignore:
Timestamp:
03/10/2008 08:44:19 AM (10 months ago)
Author:
Geert
Message:

Big unit_test update. Follow-up to r2265.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/unit_test/views/kohana_unit_test.php

    r2248 r2266  
    4040        padding: 3px; 
    4141} 
     42#kohana-unit-test .k-debug 
     43{ 
     44        padding: 3px; 
     45        background-color: #FFF0F0; 
     46        border: 1px solid #FFD0D0; 
     47        border-right-color: #FFFBFB; 
     48        border-bottom-color: #FFFBFB; 
     49        color: #83919C; 
     50} 
    4251#kohana-unit-test .k-altrow td 
    4352{ 
     
    4958        border-right: 1px solid #E5EFF8; 
    5059} 
    51 #kohana-unit-test .k-passed, #kohana-unit-test .k-altrow .k-passed 
     60#kohana-unit-test .k-passed 
    5261{ 
    5362        background-color: #E0FFE0; 
    5463} 
    55 #kohana-unit-test .k-failed, #kohana-unit-test .k-altrow .k-failed 
     64#kohana-unit-test .k-altrow .k-passed 
     65{ 
     66        background-color: #D0FFD0; 
     67} 
     68#kohana-unit-test .k-failed 
    5669{ 
    5770        background-color: #FFE0E0; 
     71} 
     72#kohana-unit-test .k-altrow .k-failed 
     73{ 
     74        background-color: #FFD0D0; 
    5875} 
    5976</style> 
     
    84101                                <?php if ($result === TRUE): ?> 
    85102 
    86                                         <td class="k-passed">Passed</td> 
     103                                        <td class="k-passed"><strong><?php echo Kohana::lang('unit_test.passed') ?></strong></td> 
    87104 
    88                                 <?php else: ?> 
     105                                <?php else: /* $result == Kohana_Unit_Test_Exception */ ?> 
    89106 
    90107                                        <td class="k-failed"> 
    91                                                 Failed: 
    92                                                 <?php 
     108                                                <strong><?php echo Kohana::lang('unit_test.failed') ?></strong> 
     109                                                <pre><?php echo html::specialchars($result->message) ?></pre> 
     110                                                <?php echo html::specialchars($result->file) ?> (<?php echo Kohana::lang('unit_test.line') ?>&nbsp;<?php echo $result->line ?>) 
    93111 
    94                                                 $trace = $result->getTrace(); 
    95                                                 echo '<span title="', $trace[0]['file'], '">', $class, EXT, ' (line&nbsp;', $trace[0]['line'], ')</span>'; 
     112                                                <?php if ($result->debug !== NULL): ?> 
     113                                                        <pre class="k-debug" title="Debug info"><?php echo '(', gettype($result->debug), ') ', html::specialchars(var_export($result->debug, TRUE)) ?></pre> 
     114                                                <?php endif ?> 
    96115 
    97                                                 ?> 
    98116                                        </td> 
    99117